Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --use-script-input-files #193

Merged
merged 1 commit into from
Nov 11, 2015

Conversation

norio-nomura
Copy link
Collaborator

Option to lint files provided by SCRIPT_INPUT_FILE_* environment variables.

I created a Xcode plugin "ExtraBuildPhase" that runs SwiftLint on every building without adding "Run Script" build phase to targets in Xcode Project.

I want to resolve a problem that on running SwiftLint by ExtraBuildPhase.
When ExtraBuildPhase runs SwiftLint on each target, SwiftLint does lint all source files under the Project directory. That cause every sources are been lint multiple time as number of targets in Project. 😞

For resolving this problem, I added functionality to ExtraBuildPhase that provide SourceBuildPhase targets(source files) by SCRIPT_INPUT_FILE_* environment variables to shell script for running SwiftLint.
https://github.com/norio-nomura/ExtraBuildPhase/releases/tag/0.3
By applying this PR and using --use-script-input-files, SwiftLint does lint only sources that builded by target on Xcode with ExtraBuildPhase.

You can try swiftlint-use-script-input-files branch of ExtraBuildPhase that enabled using --use-script-input-files option by default.

Thanks,

Option to lint files provided by `SCRIPT_INPUT_FILE_*` environment variables
@jpsim
Copy link
Collaborator

jpsim commented Nov 11, 2015

This is great, @norio-nomura! I like the Xcode plugin too! Thanks for the PR 🎉

jpsim added a commit that referenced this pull request Nov 11, 2015
@jpsim jpsim merged commit f1555c9 into realm:master Nov 11, 2015
@norio-nomura
Copy link
Collaborator Author

😄

@rompic
Copy link

rompic commented Nov 11, 2015

nice!

@norio-nomura norio-nomura deleted the use-script-input-files branch November 11, 2015 09:16
norio-nomura added a commit to norio-nomura/SwiftLint that referenced this pull request Nov 18, 2015
norio-nomura added a commit to norio-nomura/SwiftLint that referenced this pull request Nov 18, 2015
norio-nomura added a commit to norio-nomura/SwiftLint that referenced this pull request Nov 18, 2015
norio-nomura added a commit to norio-nomura/SwiftLint that referenced this pull request Nov 18, 2015
jpsim added a commit that referenced this pull request Nov 21, 2015
Add a summary of #193 to CHANGELOG.md by following to CONTRIBUTING.md
NachoSoto added a commit to NachoSoto/SwiftLint that referenced this pull request Jan 11, 2016
This was introduced in realm#193, now it's documented! I also added `autocorrect` to the list of available commands in the `README`.

Closes realm#334.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants