Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/norio-nomura/action-swiftlint
GitHub Action for SwiftLint
https://github.com/norio-nomura/action-swiftlint
docker github-actions- github-checks-api swift swiftlint
Last synced: 7 days ago
JSON representation
GitHub Action for SwiftLint
- Host: GitHub
- URL: https://github.com/norio-nomura/action-swiftlint
- Owner: norio-nomura
- License: mit
- Created: 2018-12-24T07:58:39.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-12T23:52:43.000Z (5 months ago)
- Last Synced: 2024-10-29T19:38:24.372Z (10 days ago)
- Topics: docker, github-actions-, github-checks-api, swift, swiftlint
- Language: Swift
- Homepage:
- Size: 167 KB
- Stars: 370
- Watchers: 7
- Forks: 58
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Action for SwiftLint
This Action executes [SwiftLint](https://github.com/realm/SwiftLint) and generates annotations from SwiftLint Violations.
## Usage
An example workflow(`.github/workflows/swiftlint.yml`) to executing SwiftLint follows:
```yaml
name: SwiftLinton:
pull_request:
paths:
- '.github/workflows/swiftlint.yml'
- '.swiftlint.yml'
- '**/*.swift'jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
- name: GitHub Action for SwiftLint with --strict
uses: norio-nomura/[email protected]
with:
args: --strict
- name: GitHub Action for SwiftLint (Only files changed in the PR)
uses: norio-nomura/[email protected]
env:
DIFF_BASE: ${{ github.base_ref }}
- name: GitHub Action for SwiftLint (Different working directory)
uses: norio-nomura/[email protected]
env:
WORKING_DIRECTORY: Source
```## Secrets
- ~~Specifying `GITHUB_TOKEN` to `secrets` is required to using [Check Run APIs](https://developer.github.com/v3/checks/runs/) for generating annotations from SwiftLint Violations.~~
- Since 3.0.0, `GITHUB_TOKEN` is no longer needed.## Example
[Here](https://github.com/norio-nomura/test-action-swiftlint/pull/1/files) is an example that actually works.
![screenshot](screenshot.png)## Author
Norio Nomura
## License
[MIT](LICENSE)