fix(lint): rename the short and mixed-case helper macros, and clear the last warnings (ratchet 4/n, #376) #421

Merged
allan merged 1 commits from fix/lint-macro-names into release/7.22 2026-11-01 09:06:09 +00:00
1 Commits
Author SHA1 Message Date
dc 7da67eb17b fix(lint): rename the short and mixed-case helper macros, and clear the last warnings
Build / Build-and-ng-test (pull_request) Successful in 6m23s
Lighthouse Checks / lighthouse (pull_request) Successful in 20m45s
Build / Build-and-test-development (pull_request) Successful in 35m22s
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.
2026-11-01 08:47:05 +00:00