Skip to content

Add CI custom linter framework conventions and check-custom meta target - #1198

Open
ptone wants to merge 3 commits into
mainfrom
scion/ci-linter-framework
Open

Add CI custom linter framework conventions and check-custom meta target#1198
ptone wants to merge 3 commits into
mainfrom
scion/ci-linter-framework

Conversation

@ptone

@ptone ptone commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add hack/LINT-CONVENTIONS.md documenting shared conventions for custom CI lint check scripts: exit codes (0-4), severity levels (security vs formatting), allowlist format, self-test expectations, provenance reporting, script structure template, and CI integration notes.
  • Add make check-custom meta target that runs all custom lint checks (compat-literals, check-authz-guards) as a single convenience target.
  • Update ci and ci-full targets to depend on check-custom instead of listing individual check targets. Individual targets remain independently runnable.

Refs #1193

Test plan

  • make check-custom passes (runs both existing checks)
  • make ci passes
  • make help shows check-custom with description
  • Conventions doc covers all required sections (exit codes, severity levels, allowlist format, self-test, provenance, script structure, CI integration)
  • No changes to existing check scripts or CI workflow

Scion Agent (cl-dev) added 3 commits August 22, 2026 12:30
Introduce hack/LINT-CONVENTIONS.md documenting shared conventions for
custom lint check scripts (exit codes, severity levels, allowlist format,
self-test expectations, provenance reporting, script structure, CI
integration notes).

Add a `make check-custom` meta target that runs all custom lint checks
(currently compat-literals and check-authz-guards). Update ci and ci-full
targets to depend on check-custom instead of listing individual checks.

Refs #1193
- R1: Provenance section now says 'commit SHA' and shows dirty-tracking
  matching the provenance() function in check-authz-guards.sh
- R2: Self-test fixtures can be inline heredocs (current approach) or
  standalone files in hack/testdata/
- N1: Exit code 3/4 guidance now qualifies that formatting-grade checks
  exit 0 on missing tools, with cross-reference to Severity Levels
- N2: Allowlist references check-project-compat-literals.sh for a
  populated example and check-authz-guards.sh for anchoring guidance

Refs #1193
- O-1: CI Integration now notes direct invocation is for exit-code-sensitive
  (security-grade) checks; formatting-grade checks may use make
- O-2: Script Structure template adds cd-to-repo-root as step 3, matching
  both reference implementations
- N-1: Exit code section now notes formatting-grade checks may exit 0 for
  both code 3 (missing tool) and code 4 (no candidates)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant