Skip to content

chore: add lint workflow and fix lint findings - #82

Merged
udondan merged 2 commits into
mainfrom
chore/lint-workflow
Sep 15, 2026
Merged

udondan merged 2 commits into
mainfrom
chore/lint-workflow

Conversation

@udondan

@udondan udondan commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Adds .github/workflows/lint.yml, which lints every file type in the repo with one blocking job per linter, and fixes every existing finding so the jobs are green from the start.

Job Tool Config
swift SwiftLint 0.65.1 (--strict) .swiftlint.yml
markdown markdownlint-cli2 (action v24.2.0) .markdownlint-cli2.yaml
markdown-links lychee v0.24.2 (action v2.9.0) lychee.toml
makefile checkmake v0.3.2 defaults
yaml yamllint 1.38.0 (--strict) .yamllint.yml
actions actionlint 1.7.12 (plus shellcheck on run: blocks) defaults
shell shellcheck defaults
json jq empty (syntax only)

Third-party actions are SHA-pinned. Downloaded binaries are pinned by version and checked against the SHA-256 digest of the release asset. CHANGELOG.md is excluded because release-please generates it.

Fixes

  • Swift:
    • SwiftLint autocorrections: trailing commas, redundant = nil, whitespace.
    • Wrapped long lines. Help strings are joined with + inside ArgumentHelp(...), so the --help text is unchanged.
    • Switch cases dedented to Swift style.
    • StoreeventStore, repeat_repeatFrequency.
    • The weekday tuple is now a WeekdayName struct.
    • Rules are disabled only where they conflict with a deliberate pattern, with the reason in .swiftlint.yml: file_length/type_body_length for the by-design large files, function_parameter_count for the testable free functions, and todo.
    • A few single exceptions are marked with swiftlint:disable:next and a comment explaining why.
  • Makefile: added the all and test phony targets.
  • Shell: one SC2016 exception for literal backticks in check-skill-json-fields.sh.
  • Markdown: a descriptive link text in the README instead of "here".
  • CLAUDE.md: documents the lint workflow and the lint commands.

Verification

  • Every linter exits 0 locally.
  • swift build -Xswiftc -warnings-as-errors and swift test -Xswiftc -warnings-as-errors pass (434 tests).
  • --help output of the root command and every subcommand is byte-for-byte identical to main.
  • check-skill-json-fields.sh passes.

Lint every file type in CI, one blocking job per linter: SwiftLint, markdownlint-cli2, lychee, checkmake, yamllint, actionlint, shellcheck and jq. Fix all existing findings; the help output and plain output are unchanged.
@udondan
udondan merged commit c83abb6 into main Sep 15, 2026
13 checks passed
@udondan
udondan deleted the chore/lint-workflow branch September 15, 2026 06:31
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