Skip to content

refactor: clarify analyseImport variable name and return contract (#167)#178

Merged
JuliaKalder merged 3 commits into
mainfrom
fix/issue-167
Jun 3, 2026
Merged

refactor: clarify analyseImport variable name and return contract (#167)#178
JuliaKalder merged 3 commits into
mainfrom
fix/issue-167

Conversation

@JuliaKalder
Copy link
Copy Markdown
Owner

Summary

Improves readability of analyseImport in modules/validation.js without changing any behaviour:

  • Renames seenNamesallSeenNames to make explicit that the Map accumulates both existing templates AND processed imports
  • Adds inline comment on valid = [] clarifying it includes duplicates
  • Adds inline comment on valid.push(t) pointing callers to duplicates for merge decisions

Changes

  • modules/validation.js: variable rename + 3 inline comments

Testing

No logic changes — all 96 existing tests pass.

Fixes #167

JuliBot and others added 3 commits May 14, 2026 10:55
Rename seenNames -> allSeenNames to make the dual-accumulator role
explicit, and add two inline comments clarifying that valid includes
duplicates and that callers must consult the duplicates map.

No behaviour changes.

Fixes #167
@JuliaKalder JuliaKalder merged commit ce11e8c into main Jun 3, 2026
1 check passed
@JuliaKalder JuliaKalder deleted the fix/issue-167 branch June 3, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[LOW] validation.js analyseImport: seenNames dual-purpose accumulator and 'valid' includes duplicates — return contract non-obvious from code

1 participant