realm / realm/SwiftLint

Multiple Targets and testing

Open
#3,658 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
Swift
Stars
19.7k
Forks
2.3k
Avg merge
1d 1h
Merged PRs (30d)
11

Description

I have multiple targets in my project that are separate versions of the same application, and have SwiftLint in a build phase for each of them. However I also have a scheme that runs the unit tests for each target all at once, this is what runs on my CI. This means SwiftLint runs multiple times and there is a bit of weird behaviour with warnings not showing up every time.

Is there a way I can make sure SwiftLint only runs once when testing, but also will run for each target when building it normally?

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

Reproduce the reported setup with multiple application targets, a SwiftLint build phase for each target, and a scheme that runs all unit tests together. Compare SwiftLint behavior during the combined test scheme with normal per-target builds; done means linting runs once for the test scheme while still running for each target during ordinary builds.

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
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.