realm / realm/SwiftLint

SwiftLintPlugin should leverage Xcode caching

Open
#5,243 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Build plugins can generate both prebuild and build commands. SwiftLintPlugin currently uses prebuild commands:

Because prebuild commands are run on every build, they can have a significant performance impact and should only be used when there is no way to know the names of the outputs before the command is run.

We should convert the plugin to use build commands:

The build command will run whenever its outputs are missing or if its inputs have changed since the command was last run. In other words, it is incorporated into the build command graph.

I think this would greatly improve linting performance inside of Xcode

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 locating SwiftLintPlugin and reviewing its current prebuild command setup, then read the linked Swift Package Manager command documentation. Convert the plugin to build commands with the required inputs and outputs so Xcode reruns linting only when outputs are missing or inputs change.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system, tooling
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 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.