mapbox / mapbox/mapbox-navigation-ios

Use Swift linter to ensure code quality.

Open
#2,937 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

build jira-sync-complete op-ex
Dominant language
Swift
Stars
918
Forks
326
Avg merge
1h 16m
Merged PRs (30d)
3

Description

There is a company-wide discussion about lint usage in Swift code: https://github.com/mapbox/apple-internal/issues/20.

We've already encountered a couple of crashes because we didn't forbid the usage of force unwrapping and implicit optional. @1ec5 proposed to add a linter to warn about unsafe code here: https://github.com/mapbox/mapbox-directions-swift/issues/453

In addition, sometimes I review PRs and come across trivial typos that a linter could have caught during the development. Adding a linter can help us here. An example of such a PR: https://github.com/mapbox/mapbox-navigation-ios-examples/pull/89.

As a reference, Nikolay from 1Tap recently added a SwiftLint: https://github.com/mapbox/1tap-ios/pull/128

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked company discussion, related issue 453, example PR 89, and the SwiftLint integration in 1Tap PR 128. Then inspect this repository's Swift build and validation setup. Done means a linter is integrated with rules covering force unwrapping, implicit optionals, and trivial typos, with its checks passing on the project.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.