Our style guide requires the use of implicit return and our library team requires full documentation, so we should add linter rules to enforce these things instead of having to spot them during code review.
Purpose
Update SwiftLint config with implicit_return and missing_docs rules. Fix any linter violations.
Scope
Update .swiftlint.yml
Fix linter violations
Discussion
YNetwork had violations of both rules. There’s also a new change in how SwiftLint enforces the large_tuple rule. I just disabled it for the unit tests in question. (Not worth declaring specialty struct’s in this case in my opinion.)
I also enabled the gathering of code coverage from unit tests (the .xcscheme file) because that had been missing.
We want to roll out these changes to all of our YML libraries, both in Bitbucket and on GitHub.
Fixes Issue #53
📈 Coverage
Unchanged. And documentation coverage should now be enforced by the linter!
Introduction
Our style guide requires the use of implicit return and our library team requires full documentation, so we should add linter rules to enforce these things instead of having to spot them during code review.
Purpose
Update SwiftLint config with
implicit_return
andmissing_docs
rules. Fix any linter violations.Scope
.swiftlint.yml
Discussion
YNetwork had violations of both rules. There’s also a new change in how SwiftLint enforces the large_tuple rule. I just disabled it for the unit tests in question. (Not worth declaring specialty struct’s in this case in my opinion.)
I also enabled the gathering of code coverage from unit tests (the
.xcscheme
file) because that had been missing.We want to roll out these changes to all of our YML libraries, both in Bitbucket and on GitHub.
Fixes Issue #53
📈 Coverage
Unchanged. And documentation coverage should now be enforced by the linter!