chore: add lint workflow and fix lint findings - #82
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.swift--strict).swiftlint.ymlmarkdown.markdownlint-cli2.yamlmarkdown-linkslychee.tomlmakefileyaml--strict).yamllint.ymlactionsrun:blocks)shelljsonjq 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.mdis excluded because release-please generates it.Fixes
= nil, whitespace.+insideArgumentHelp(...), so the--helptext is unchanged.Store→eventStore,repeat_→repeatFrequency.WeekdayNamestruct..swiftlint.yml:file_length/type_body_lengthfor the by-design large files,function_parameter_countfor the testable free functions, andtodo.swiftlint:disable:nextand a comment explaining why.allandtestphony targets.SC2016exception for literal backticks incheck-skill-json-fields.sh.Verification
swift build -Xswiftc -warnings-as-errorsandswift test -Xswiftc -warnings-as-errorspass (434 tests).--helpoutput of the root command and every subcommand is byte-for-byte identical tomain.check-skill-json-fields.shpasses.