Repository navigation
[1297] Add free-variables check rule - #1779
Merged
PinkMagicFly merged 1 commit intoNov 25, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Thank you for this PR, @saptadeep12! Adding a conservative, non-blocking |
Contributor
Author
|
Thanks for the review and for merging @PinkMagicFly. Happy to help :) |
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.
What
Adds a
free-variablesrule togf checkthat warns on unbound identifiers.Why
Part of the
gf checkstatic-checker series. It catches typos and missing imports before runtime, using the analysis foundation from #1740.How
free-variablesrule, split into small modules to stay withinmax-tree-depth, and registered inrules.scmandconfig.scmonly/except/rename/prefix), top-level defines, record types, and local forms (lambda,letfamily, namedlet,do,case-lambda,define*formals,let-values)cond-expand,eval,include, unresolvable imports)readare skipped"free-variables": {"enabled": true}ingf_check.json; supportsexcludesand--only free-variablesTesting
enabled: false,excludes, and--onlydefine*formals, keyword symbols,read, andcdddrbin/gf checkpasses, includingmax-tree-depthandmax-file-linesgf fmtverified per changed file (Windows; CI runs the full format check on Linux)Reviewer notes
excludesand no changes to existing rules' config