Skip to content

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

Open
JuliaKalder wants to merge 1 commit into
mainfrom
fix/issue-167
Open

refactor: clarify analyseImport variable name and return contract (#167)#178
JuliaKalder wants to merge 1 commit 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

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
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