Compare commits

..

1 Commits

Author SHA1 Message Date
3dd6cfcdcb linter fixes
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline failed
2026-02-18 08:29:27 +01:00
3 changed files with 10 additions and 11 deletions

View File

@@ -82,17 +82,14 @@ endef
lint: lint:
@echo "==> Merging..." @echo "==> Merging..."
@rm -f $(LINT_TMP_LUA) $(LINT_TMP_MAP) @rm -f $(LINT_TMP_LUA) $(LINT_TMP_MAP)
@touch $(LINT_TMP_LUA)
@line=1; \ @line=1; \
while IFS= read -r f || [ -n "$$f" ]; do \ while IFS= read -r f || [ -n "$$f" ]; do \
[ -z "$$f" ] && continue; \ [ -z "$$f" ] && continue; \
before=$$(wc -l < $(LINT_TMP_LUA)); \ linecount=$$(awk 'END{print NR}' "$(SRC_DIR)/$$f"); \
cat "$(SRC_DIR)/$$f" >> $(LINT_TMP_LUA); \
printf '\n' >> $(LINT_TMP_LUA); \
after=$$(wc -l < $(LINT_TMP_LUA)); \
linecount=$$((after - before)); \
echo "$$line $$linecount $(SRC_DIR)/$$f" >> $(LINT_TMP_MAP); \ echo "$$line $$linecount $(SRC_DIR)/$$f" >> $(LINT_TMP_MAP); \
line=$$((line + linecount)); \ cat "$(SRC_DIR)/$$f" >> $(LINT_TMP_LUA); \
echo "" >> $(LINT_TMP_LUA); \
line=$$((line + linecount + 1)); \
done < $(ORDER) done < $(ORDER)
@echo "==> luacheck..." @echo "==> luacheck..."
@luacheck --no-max-line-length $(LINT_TMP_LUA) 2>&1 | awk -v map=$(LINT_TMP_MAP) ' \ @luacheck --no-max-line-length $(LINT_TMP_LUA) 2>&1 | awk -v map=$(LINT_TMP_MAP) ' \
@@ -117,7 +114,7 @@ lint:
rest = substr(rest2, colon3); \ rest = substr(rest2, colon3); \
found = 0; \ found = 0; \
for (i = 0; i < NR_map; i++) { \ for (i = 0; i < NR_map; i++) { \
end_line = start[i] + count[i] -1; \ end_line = start[i] + count[i]; \
if (absline >= start[i] && absline <= end_line) { \ if (absline >= start[i] && absline <= end_line) { \
relline = absline - start[i] + 1; \ relline = absline - start[i] + 1; \
print fname[i] ":" relline ":" col ":" rest; \ print fname[i] ":" relline ":" col ":" rest; \
@@ -151,7 +148,7 @@ clean:
# CI/CD Targets # CI/CD Targets
ci-version: ci-version:
@VERSION=$$(sed -n "s/^-- version: //p" inc/meta/meta.header.lua | head -n 1 | tr -d "[:space:]"); \ @VERSION=$$(sed -n "s/^-- version: //p" inc-meta-meta.header.lua | head -n 1 | tr -d "[:space:]"); \
BRANCH=$${CI_COMMIT_BRANCH:-$${WOODPECKER_BRANCH}}; \ BRANCH=$${CI_COMMIT_BRANCH:-$${WOODPECKER_BRANCH}}; \
BRANCH=$$(echo "$$BRANCH" | tr '/' '-'); \ BRANCH=$$(echo "$$BRANCH" | tr '/' '-'); \
if [ "$$BRANCH" != "main" ] && [ "$$BRANCH" != "master" ] && [ -n "$$BRANCH" ]; then \ if [ "$$BRANCH" != "main" ] && [ "$$BRANCH" != "master" ] && [ -n "$$BRANCH" ]; then \

View File

@@ -8,6 +8,7 @@ local AudioTestWindow = {}
local MinigameButtonMashWindow = {} local MinigameButtonMashWindow = {}
local MinigameRhythmWindow = {} local MinigameRhythmWindow = {}
local MinigameDDRWindow = {} local MinigameDDRWindow = {}
Util = {} Util = {}
DesitionManager = {} DesitionManager = {}
ScreenManager = {} -- New declaration ScreenManager = {} -- New declaration

View File

@@ -1,6 +1,6 @@
function IntroWindow.draw() function IntroWindow.draw()
local x = (Config.screen.width - 132) / 2 -- Centered text local x = (Config.screen.width - 132) / 2 -- Centered text
Print.text(Context.intro.text, x, Context.intro.y, Config.colors.green) Print.text(Context.intro.text, x, Context.intro.y, Config.colors.green)
end end
function IntroWindow.update() function IntroWindow.update()
@@ -22,3 +22,4 @@ function IntroWindow.update()
GameWindow.set_state(WINDOW_MENU) GameWindow.set_state(WINDOW_MENU)
end end
end end