This repository has been archived by the owner on Aug 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
This file contains 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
0bb3e27
to
45f6f48
Compare
20b4d55
to
a99acb5
Compare
gordonbrander
approved these changes
May 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Let's pick a time to merge this when it won't cause a bunch of disruption.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Trying out a basic set of rules for catching mistakes like line length etc. everything is configured as a warning rather than an error right now so the build will never fail for lint reasons. I started with all the rules on and removed anything that was obviously in conflict with our existing style / rules.
We have ~500 lint warnings in the codebase atm and it would be good to fix them because github actions can only display a maximum of 10 linting errors per run (yeah, I know). So lint errors introduced in a PR won't actually show up in the UI until we clear the backlog of underlying lint issues.
The github action I used (made by the author of Swiftlint) purports to be able to scope the linting to only files changed in the PR but I get errors whenever I try to configure it as per their example.
Swiftlint can fix basic issues by running
swiftlint --fix
but we need to pick our moment carefully to avoid conflicts with in-flight work.You can also choose to integrate swiftlint into Xcode as a build action (see this draft PR #573). If we gain enough confidence in rules I would be tempted to add a pre-commit hook that autofixes.