Repository navigation
ci(lint): fail on a truncated or plainly closed doxygen header - #478
Merged
Merged
Conversation
Both rules already report on this corpus; at their default severity they report and nothing else. Promoting them to `error` makes core the place a truncated header stops, rather than a warning a contributor can scroll past. `hasDoxygenHeader` also carries the new check for a header closed with a single asterisk: SAS ends a block comment at the first `*/`, so a `*/`-closed header hides everything after it from the parser. The corpus is clean under both, measured with @sasjs/lint 4.4.0 over every folder in `sasjs/sasjsconfig.json` - 232 findings, all from other rules, none from these two, so no macro changes here. The AGENTS.md rule list gains the header-shape line, so the guidance a contributor reads matches what the lint enforces.
Contributor
Author
There was a problem hiding this comment.
Reviewed the diff (.sasjslint and AGENTS.md): two rules are raised to error and the contributor doc describes them.
- .sasjslint:15-17 sets a severity for noNestedCommentsInHeader, but the repo declares no @sasjs/lint version (no package.json at the root), so what enforces this is whichever linter release CI installs. If that release predates the rule the key is ignored without a word and the gate this PR announces does not exist. Confirm the CI-installed @sasjs/lint provides noNestedCommentsInHeader, and if severityLevel alone does not turn on a rule that is off by default, enable it under rules as well.
1 finding above for review.
|
🎉 This PR is included in version 6.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
.sasjslintpromotes the two doxygen-header rules toerror:Why
Both rules already report on this corpus; at their default severity they report and nothing else. Promoted, a truncated header stops at the commit rather than surviving to a build - which is what
sasjs/utils4.1.1 now catches at compile time and what the lint reports at author time, released in@sasjs/lint4.4.0 (sasjs/lint#265).hasDoxygenHeaderaterroralso makes its new check fatal: a header closed with a single asterisk. SAS ends a block comment at the first*/, so everything a*/-closed header appears to enclose is parsed as code.Measurement, not assumption
Ran
@sasjs/lint4.4.0 over every folder insasjs/sasjsconfig.json(base, ddl, fcmp, lua, meta, metax, server, viya, xplatform, tests/*) with the current config and with both rules aterror: 232 findings either way, all from other rules (line endings, indentation, undeclared macros), none from these two. So this changes no macro and cannot redden CI on today's corpus.The severity override was validated separately - setting
lineEndings: errorflips 78 findings from warning to error, so the override path is live and the zero above is a real zero.sasjs lint(CLI 6.2.4) against the project exits with warnings only, and none of them are header findings.Also
AGENTS.mdgains the header-shape line, so the rules a contributor reads match what the lint enforces.