Closed jon-tous closed 3 months ago
The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)
If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and iOS rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you!
[x] The commit messages for the remote branch should be checked to make sure the contributor's email is set up correctly so that they receive credit for their contribution
git config user.email
in their local Scribe-iOS repo[x] The linting and formatting workflows within the PR checks do not indicate new errors in the files changed
[x] The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)
Contributor checklist
Description
Removed for_where as a disabled rule from .swiftlint.yml and fixed all errors for it in the codebase.
After removing
for_where
fromdisabled_rules
, I fixed all 6 violations by removing the if statement within each affected for-loop, and moving the condition into awhere
clause on the for-loop itself. This is the preferred syntax for SwiftLint enforced by thefor_where
rule, and this refactor does not affect functionality. After making those changes, no SwiftLint warnings were shown, and runningswiftlint --strict
in the project root confirmed:Done linting! Found 0 violations, 0 serious in 86 files.
This rule would now be enforced by SwiftLint to prevent further violations from entering the codebase.I verified on the iPhone 15 Pro simulator and iPad Pro 13-inch simulator (both iOS 17.5) that the app builds and runs as usual following this change and the affected constraints look as normal. I verified with one of these fixed violations that this refactor does not affect which elements run the body of loop/conditional, using print statements and comparing the values of all the possible constraints before vs. after the refactor.
Related issue
428