Rung 4 of the #376 ratchet, on top of #420. This clears the last 5 findings and promotes the three rules that produced them to error. With this applied in isolation, npm run lint:sas reports 0 warnings, 0 errors: every rule that fires on this codebase is now promoted.
Tests on sas.4gl.io
$ sasjs cbd -t server-lint
✔ Services have been successfully deployed to https://sas.4gl.io
$ sasjs request services/admin/makedata -d deploy/makeDataServer.json -t server-lint
[{'STATUS': 'SUCCESS', 'MESSAGE': 'Data Controller Config created by sasjssrv', ...}]
$ sasjs test -t server-lint
ℹ Tests provided results: 64/64 (100%)
Tests that pass: 64/64 (100%)
Run against a scratch appLoc (/Public/app/dc-lint-ratchet), so /Public/app/dc is untouched. The scratch target was in sasjsconfig.json only for the run and is not part of the commit. The viewdata and usergroupsbymember suites are in that run, so both renames below are covered by passing tests.
What changed
services/public/viewdata.sas wraps its service body in a helper macro named x; it becomes viewdata_body. The wrapper is what keeps the %global and the %return in one macro scope, so the rename is purely mechanical.
targets/sas9/.../usernav/usergroupsbymember.sas builds work.iwant inside a helper macro named x; it becomes build_iwant.
targets/sas9/.../admin/refreshtablelineage.sas defines getTables with uppercase; it becomes gettables at the definition, the %mend and its seven call sites.
services/auditors/getstagetable.test.sas: one comment line carried three leading spaces where the file uses two.
Promoted: minMacroNameLength, lowerCaseMacroNames (both default-on settings that already warned at their default values) and indentationMultiple.
Verification
npm run lint:sas: 0 warnings, 0 errors, exit 0 - All matched files use @sasjs/lint code style!
sasjs compile: succeeds.
Full SAS suite on sas.4gl.io: 64/64 (above).
Remaining
The next rung turns on the off-by-default rules. Measured on this tree: noSingleAsteriskComments 9 findings, noUnusedLibnames 1, lineEndings 34 (33 files with no trailing newline, 3 stored with CRLF) - that last one is whitespace-only and will be its own PR. noMacroIfInOpenCode stays off, with the reason recorded in AGENTS.md: it flags the open-code %if blocks service bodies rely on, which need SAS 9.4M5, and the documented minimum is 9.4M3.
Rung 4 of the #376 ratchet, on top of #420. This clears the last 5 findings and promotes the three rules that produced them to `error`. With this applied in isolation, `npm run lint:sas` reports **0 warnings, 0 errors**: every rule that fires on this codebase is now promoted.
## Tests on sas.4gl.io
```
$ sasjs cbd -t server-lint
✔ Services have been successfully deployed to https://sas.4gl.io
$ sasjs request services/admin/makedata -d deploy/makeDataServer.json -t server-lint
[{'STATUS': 'SUCCESS', 'MESSAGE': 'Data Controller Config created by sasjssrv', ...}]
$ sasjs test -t server-lint
ℹ Tests provided results: 64/64 (100%)
Tests that pass: 64/64 (100%)
```
Run against a scratch appLoc (`/Public/app/dc-lint-ratchet`), so `/Public/app/dc` is untouched. The scratch target was in `sasjsconfig.json` only for the run and is not part of the commit. The `viewdata` and `usergroupsbymember` suites are in that run, so both renames below are covered by passing tests.
## What changed
- `services/public/viewdata.sas` wraps its service body in a helper macro named `x`; it becomes `viewdata_body`. The wrapper is what keeps the `%global` and the `%return` in one macro scope, so the rename is purely mechanical.
- `targets/sas9/.../usernav/usergroupsbymember.sas` builds `work.iwant` inside a helper macro named `x`; it becomes `build_iwant`.
- `targets/sas9/.../admin/refreshtablelineage.sas` defines `getTables` with uppercase; it becomes `gettables` at the definition, the `%mend` and its seven call sites.
- `services/auditors/getstagetable.test.sas`: one comment line carried three leading spaces where the file uses two.
Promoted: `minMacroNameLength`, `lowerCaseMacroNames` (both default-on settings that already warned at their default values) and `indentationMultiple`.
## Verification
- `npm run lint:sas`: 0 warnings, 0 errors, exit 0 - `All matched files use @sasjs/lint code style!`
- `sasjs compile`: succeeds.
- Full SAS suite on sas.4gl.io: 64/64 (above).
## Remaining
The next rung turns on the off-by-default rules. Measured on this tree: `noSingleAsteriskComments` 9 findings, `noUnusedLibnames` 1, `lineEndings` 34 (33 files with no trailing newline, 3 stored with CRLF) - that last one is whitespace-only and will be its own PR. `noMacroIfInOpenCode` stays off, with the reason recorded in `AGENTS.md`: it flags the open-code `%if` blocks service bodies rely on, which need SAS 9.4M5, and the documented minimum is 9.4M3.
Rung 4 of the #376 ratchet. It clears the last 5 findings and promotes the
three rules that produced them to "error": minMacroNameLength,
lowerCaseMacroNames and indentationMultiple. `sasjs lint` now reports no
warnings and no errors across the project.
- viewdata.sas wraps its service body in a helper macro named `x`; it
becomes viewdata_body. The wrapper is what keeps the %global and the
%return in one macro scope.
- usergroupsbymember.sas (sas9) builds work.iwant inside a helper macro
named `x`; it becomes build_iwant.
- refreshtablelineage.sas (sas9) defines `getTables` with uppercase; it
becomes `gettables`, at the definition, the %mend and its seven calls.
- getstagetable.test.sas: one comment line carried three leading spaces
where the file uses two.
VERIFICATION
- `npm run lint:sas`: 0 warnings, 0 errors, exit 0, "All matched files
use @sasjs/lint code style!".
- `sasjs compile`: succeeds.
- Deployed to sas.4gl.io and ran the SAS suite there against a scratch
appLoc (/Public/app/dc-lint-ratchet) seeded with makedata: "Tests that
pass: 64/64 (100%)". The viewdata and usergroupsbymember suites are in
that run, so the two renames are covered by passing tests.
allan
merged commit de5cb029eb into release/7.222026-11-01 09:06:09 +00:00
allan
deleted branch fix/lint-macro-names2026-11-01 09:06:09 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Rung 4 of the #376 ratchet, on top of #420. This clears the last 5 findings and promotes the three rules that produced them to
error. With this applied in isolation,npm run lint:sasreports 0 warnings, 0 errors: every rule that fires on this codebase is now promoted.Tests on sas.4gl.io
Run against a scratch appLoc (
/Public/app/dc-lint-ratchet), so/Public/app/dcis untouched. The scratch target was insasjsconfig.jsononly for the run and is not part of the commit. Theviewdataandusergroupsbymembersuites are in that run, so both renames below are covered by passing tests.What changed
services/public/viewdata.saswraps its service body in a helper macro namedx; it becomesviewdata_body. The wrapper is what keeps the%globaland the%returnin one macro scope, so the rename is purely mechanical.targets/sas9/.../usernav/usergroupsbymember.sasbuildswork.iwantinside a helper macro namedx; it becomesbuild_iwant.targets/sas9/.../admin/refreshtablelineage.sasdefinesgetTableswith uppercase; it becomesgettablesat the definition, the%mendand its seven call sites.services/auditors/getstagetable.test.sas: one comment line carried three leading spaces where the file uses two.Promoted:
minMacroNameLength,lowerCaseMacroNames(both default-on settings that already warned at their default values) andindentationMultiple.Verification
npm run lint:sas: 0 warnings, 0 errors, exit 0 -All matched files use @sasjs/lint code style!sasjs compile: succeeds.Remaining
The next rung turns on the off-by-default rules. Measured on this tree:
noSingleAsteriskComments9 findings,noUnusedLibnames1,lineEndings34 (33 files with no trailing newline, 3 stored with CRLF) - that last one is whitespace-only and will be its own PR.noMacroIfInOpenCodestays off, with the reason recorded inAGENTS.md: it flags the open-code%ifblocks service bodies rely on, which need SAS 9.4M5, and the documented minimum is 9.4M3.