codeandtheory / ynetwork-ios

A networking layer for iOS and tvOS.
Apache License 2.0
3 stars 3 forks source link

[CM-998] Add new linter rules and fix warnings #6

Closed mpospese closed 1 year ago

mpospese commented 1 year ago

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 and missing_docs rules. Fix any linter violations.

Scope

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!