chore(lint): normalise line endings and make lineEndings an error (ratchet 6/n, #376) #423

Merged
allan merged 1 commits from fix/lint-line-endings into release/7.22 2026-11-01 10:05:51 +00:00
Collaborator

Rung 6 of the #376 ratchet, on top of #422. "lineEndings": "lf" is enabled and promoted to error; its 37 findings are cleared and nothing but line endings changed.

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

Scratch appLoc (/Public/app/dc-lint-ratchet), seeded with makedata; the shared /Public/app/dc deployment is untouched and the scratch target is not part of the commit.

What changed

  • 34 files ended without a newline; each now ends with exactly one LF.
  • 3 files were stored with CRLF - services/public/getgroups.sas and the two sas9 lineage services (getmetacols, getmetatables) - against the repo's own * text=auto eol=lf in .gitattributes. They are converted to LF.

That is why the diff is 38 files: it is one changed line in most of them, and a whole-file change in the three CRLF ones.

Checked mechanically that this is whitespace only: for every changed file, HEAD's content and the new content are byte-identical once CRLF is folded to LF and the trailing newline is stripped.

Verification

  • npm run lint:sas: 0 warnings, 0 errors, exit 0.
  • sasjs compile: succeeds.
  • Full SAS suite on sas.4gl.io: 64/64 (above).

After this

Every rule that fires on this codebase is now promoted, so npm run lint:sas failing means a regression rather than a backlog item. The only rule deliberately left off is noMacroIfInOpenCode, with the reason recorded in AGENTS.md: the open-code %if blocks service bodies rely on need SAS 9.4M5, and the documented minimum is 9.4M3.

Once this is merged, #376 can be closed and the scratch appLocs and seeded libraries on sas.4gl.io (/Public/app/dc-lint-ratchet, /Public/app/dc-lint-ratchet-b and their /tmp/dcdata/DC* libraries) removed.

Rung 6 of the #376 ratchet, on top of #422. `"lineEndings": "lf"` is enabled and promoted to `error`; its 37 findings are cleared and **nothing but line endings changed**. ## 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%) ``` Scratch appLoc (`/Public/app/dc-lint-ratchet`), seeded with `makedata`; the shared `/Public/app/dc` deployment is untouched and the scratch target is not part of the commit. ## What changed - 34 files ended without a newline; each now ends with exactly one LF. - 3 files were stored with CRLF - `services/public/getgroups.sas` and the two sas9 lineage services (`getmetacols`, `getmetatables`) - against the repo's own `* text=auto eol=lf` in `.gitattributes`. They are converted to LF. That is why the diff is 38 files: it is one changed line in most of them, and a whole-file change in the three CRLF ones. Checked mechanically that this is whitespace only: for every changed file, HEAD's content and the new content are byte-identical once CRLF is folded to LF and the trailing newline is stripped. ## Verification - `npm run lint:sas`: 0 warnings, 0 errors, exit 0. - `sasjs compile`: succeeds. - Full SAS suite on sas.4gl.io: 64/64 (above). ## After this Every rule that fires on this codebase is now promoted, so `npm run lint:sas` failing means a regression rather than a backlog item. The only rule deliberately left off is `noMacroIfInOpenCode`, with the reason recorded in `AGENTS.md`: the open-code `%if` blocks service bodies rely on need SAS 9.4M5, and the documented minimum is 9.4M3. Once this is merged, #376 can be closed and the scratch appLocs and seeded libraries on sas.4gl.io (`/Public/app/dc-lint-ratchet`, `/Public/app/dc-lint-ratchet-b` and their `/tmp/dcdata/DC*` libraries) removed.
hermes added 1 commit 2026-11-01 09:31:39 +00:00
chore(lint): normalise line endings and make lineEndings an error
Build / Build-and-ng-test (pull_request) Successful in 6m25s
Lighthouse Checks / lighthouse (pull_request) Successful in 20m42s
Build / Build-and-test-development (pull_request) Successful in 31m10s
0662f6230b
Rung 6 of the #376 ratchet: `"lineEndings": "lf"` is enabled and promoted to
"error". Its 37 findings are cleared and nothing but line endings changed.

- 34 files ended without a newline; each now ends with exactly one LF.
- 3 files were stored with CRLF (services/public/getgroups.sas and the two
  sas9 lineage services, getmetacols and getmetatables), against the repo's
  own `* text=auto eol=lf` in .gitattributes. They are converted to LF.

Checked mechanically that this is whitespace only: for every changed file,
HEAD's content and the new content are identical once CRLF is folded to LF
and the trailing newline is stripped.

VERIFICATION

- `npm run lint:sas`: 0 warnings, 0 errors, exit 0.
- `sasjs compile`: succeeds.
- On sas.4gl.io, against a scratch appLoc seeded with makedata:
  "Tests that pass: 64/64 (100%)".
allan merged commit e1a33c9ae9 into release/7.22 2026-11-01 10:05:51 +00:00
allan deleted branch fix/lint-line-endings 2026-11-01 10:05:51 +00:00
Sign in to join this conversation.