Comments (4)
+1 - I would love to use it on macOS as well
from action-swiftlint.
I have the same request. In the meantime this little workflow gets the job done by running swiftlint only on changed files on our self hosted macOS runner.
name: Linter - SwiftLint
on:
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
swift_format:
name: lint
runs-on: [self-hosted, iOS]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Run swiftlint
run: |
echo ""
echo "🏃♂️ Running swiftlint on modified files 🤵♂️"
git diff --name-status origin/main \
| grep -E "^A|^M" | sed "s/^[AM]\t//g" \
| grep -E "\.swift\$$" \
|| echo "No files added nor modified!"
git diff --name-status origin/main \
| grep -E "^A|^M" | sed "s/^[AM]\t//g" \
| grep -E "\.swift\$$" \
| xargs --no-run-if-empty swiftlint lint --quiet --strict --reporter github-actions-logging
from action-swiftlint.
yes please!
from action-swiftlint.
Everyone interested, please checkout "SwiftLint Annotations" Action which doesn't use Docker and natively runs swiftlint
binary.
from action-swiftlint.
Related Issues (20)
- Run swiftlint only on changed files HOT 1
- Action posts only 10 Warnings HOT 2
- Strict mode HOT 1
- Read .swiftlint.yml rules HOT 4
- Option to run swiftlint only on changed files regression? HOT 6
- Pinned swiftlint version support HOT 3
- Action fails after running swiftlint HOT 1
- Swiftlint is still checking unchanged files HOT 15
- SwiftLint checking Pods even though .swiftlint.yml excludes them. HOT 1
- Support for paths or filenames with spaces HOT 1
- Using actions/checkout@v1 downloading the repo source Everytime HOT 2
- Checking only Files in PR - .swiftlint.yml is not respected HOT 1
- SwiftLint has changed calculation of the root path HOT 1
- Support PR reviews HOT 1
- Swiftlint and .swiftlint.yml in submodule
- Can't run GitHub Action for SwiftLint (Only files changed in the PR) HOT 2
- Can't use SwiftLint file in repo HOT 2
- Won't work on Github CI HOT 1
- Support `pull_request` event HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action-swiftlint.