Closed Bug 1656443 Opened 5 years ago Closed 5 years ago

Resolve swiftlint/swiftformat issues

Categories

(Data Platform and Tools :: Glean: SDK, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: janerik, Assigned: janerik)

Details

Attachments

(1 file)

The recent new release of swiftformat changes where to place braces.
Our swiftlint disagrees.

Failing task: https://bugzilla.mozilla.org/enter_bug.cgi?product=Data+Platform+and+Tools&component=Glean%3A+SDK&priority=P3&status_whiteboard=%5Btelemetry%3Aglean-rs%3Am%3F%5D

Versions:

  • swiftlint version: 0.39.2
  • swiftformat --version: 0.45.1

Because we install them from homebrew it's hard to pin down the versions.
It's not the first time the tools disagree.

We should decide how to move forward.

  1. One solution could be to only use one tool in CI.
    Have the options for devs to usw swiftformat, but make it clear that they should not modify unrelated code.

  2. We could disable the brace rule in either of the tools (the brace rule is what currently breaks, disabling it in swiftlint is easy

  3. We could ignore it and wait for the tools to agree again (not good)

I don't feel like tackling that today, but for the sake of merging green PRs I think we should solve this on Monday, at a minimum by disabling the check completely.

:travis your feedback would be appreciated, then we can tackle that early Monday European morning.

Flags: needinfo?(tlong)
Severity: -- → N/A
Priority: P3 → P2
Whiteboard: [telemetry:glean-rs:m?]

As I mentioned in our team channel, I would be happy if we remove/disable one of the tools, my preference being to disable swiftfmt. My reasoning behind this is that Xcode has decent default formatting guidelines and we get the most benefit from swiftlint because of this.

Flags: needinfo?(tlong)
Assignee: nobody → jrediger
Priority: P2 → P1
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: