realm / realm/SwiftLint

Xcode 14 introduces new run script build phase warning for SwiftLint

Open
#4,015 44 comments 131 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

New Issue Checklist
Describe the bug

Possibly somewhat of a duple of #2783, but Xcode 14 appears to emit a new warning for run script build phases without specified outputs:

warning build: Run script build phase 'SwiftLint' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase.

image

I'm following the usage guidance as documented in the README.md. I'm curious what the proper configuration should be for to appease this warning as by default SwiftLint doesn't really modify any files. That said, it seems excessive to run in every build if no input files have changed....

Adding link to Apple's documentation of Run Script build phases that highly recommends specifying input and output files: https://developer.apple.com/documentation/xcode/running-custom-scripts-during-a-build?changes=_2_3

Complete output when running SwiftLint, including the stack trace and command used
export PATH="$PATH:/opt/homebrew/bin"

if which swiftlint > /dev/null; then
  swiftlint
else
  echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi

Environment
  • Installed via Homebrew
     $ swiftlint version
     0.47.1
    
  • default swiftlint config
  • Xcode 14.0 beta 2 (14A5229c)

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 with the Xcode usage section in README.md and the provided SwiftLint run script, then review the linked Apple documentation and related issue #2783. Done should mean the documented or recommended configuration addresses Xcode 14's run-script warning without unnecessarily changing when SwiftLint runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.