Skip to content

ci(lint): fail on a truncated or plainly closed doxygen header - #478

Merged
allanbowe merged 1 commit into
mainfrom
ci/lint-strict-headers
Oct 27, 2026
Merged

allanbowe merged 1 commit into
mainfrom
ci/lint-strict-headers

Conversation

@sasjs-dev

@sasjs-dev sasjs-dev Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

What

.sasjslint promotes the two doxygen-header rules to error:

"severityLevel": {
  "hasDoxygenHeader": "error",
  "noNestedCommentsInHeader": "error"
}

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/utils 4.1.1 now catches at compile time and what the lint reports at author time, released in @sasjs/lint 4.4.0 (sasjs/lint#265).

hasDoxygenHeader at error also 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/lint 4.4.0 over every folder in sasjs/sasjsconfig.json (base, ddl, fcmp, lua, meta, metax, server, viya, xplatform, tests/*) with the current config and with both rules at error: 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: error flips 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.md gains the header-shape line, so the rules a contributor reads match what the lint enforces.

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.

@sasjs-dev sasjs-dev Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@allanbowe
allanbowe merged commit b92e7d2 into main Oct 27, 2026
3 of 4 checks passed
@allanbowe
allanbowe deleted the ci/lint-strict-headers branch October 27, 2026 16:28
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 6.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant