Merged
Conversation
Configure luacheck with: - Factorio 2.0 API globals (storage, helpers, prototypes, etc.) - CreativeMod's ~40 module globals - Factorio base data stage globals - Suppressed warnings for legacy code patterns (unused vars, shadowing) - Kept W111/W113 (undefined globals) active to catch real bugs
luacheck caught that `k` was being set as a global variable instead of local in two places in item-providers-util.lua. This could potentially cause subtle bugs if the global `k` was read elsewhere.
Configure stylua formatter with: - 2-space indentation (matching modern Factorio mod conventions) - 120 character column width - Unix line endings - Auto-prefer double quotes
Reformatted all 57 Lua files using stylua with: - 2-space indentation (was tabs) - 120 character column width - Unix line endings - Double quotes preferred This is a pure formatting change with no logic modifications. Use .git-blame-ignore-revs to skip this commit in git blame.
Allows git blame to look through the stylua formatting commit. Configure with: git config blame.ignoreRevsFile .git-blame-ignore-revs
Runs on push to master and all PRs: - luacheck: static analysis for undefined globals, wrong API usage - stylua: formatting check (2-space indent, 120 col width)
`not x == false` is parsed as `(not x) == false` due to operator precedence. Changed to `x ~= false` which expresses the intent clearly. Caught by luacheck W582 in CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.