https://github.com/reviewdog/action-nimlint
Run nim check with reviewdog
https://github.com/reviewdog/action-nimlint
github-actions nim reviewdog
Last synced: about 1 month ago
JSON representation
Run nim check with reviewdog
- Host: GitHub
- URL: https://github.com/reviewdog/action-nimlint
- Owner: reviewdog
- License: mit
- Created: 2020-05-16T00:24:27.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-19T14:34:09.000Z (2 months ago)
- Last Synced: 2025-03-19T18:43:58.708Z (2 months ago)
- Topics: github-actions, nim, reviewdog
- Language: Shell
- Size: 74.2 KB
- Stars: 10
- Watchers: 29
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# action-nimlint
[](https://github.com/reviewdog/action-nimlint/actions?query=workflow%3ATest)
[](https://github.com/reviewdog/action-nimlint/actions?query=workflow%3Areviewdog)
[](https://github.com/reviewdog/action-nimlint/actions?query=workflow%3Adepup)
[](https://github.com/reviewdog/action-nimlint/actions?query=workflow%3Arelease)
[](https://github.com/reviewdog/action-nimlint/releases)
[](https://github.com/haya14busa/action-bumpr)
This action lints [Nim](https://nim-lang.org/) codes.
nimlint-action is inspired by [reviewdog/action-eslint](https://github.com/reviewdog/action-eslint).This action runs `nim check` with
[reviewdog](https://github.com/reviewdog/reviewdog) on pull requests to improve
code review experience.## Input
```yaml
inputs:
github_token:
description: 'GITHUB_TOKEN'
default: '${{ github.token }}'
workdir:
description: 'Working directory relative to the root directory.'
default: '.'
### Flags for reviewdog ###
level:
description: 'Report level for reviewdog [info,warning,error]'
default: 'error'
reporter:
description: 'Reporter of reviewdog command [github-pr-check,github-check,github-pr-review].'
default: 'github-pr-check'
filter_mode:
description: |
Filtering for the reviewdog command [added,diff_context,file,nofilter].
Default is added.
default: 'added'
fail_level:
description: |
If set to `none`, always use exit code 0 for reviewdog.
Otherwise, exit code 1 for reviewdog if it finds at least 1 issue with severity greater than or equal to the given level.
Possible values: [none,any,info,warning,error]
Default is `none`.
default: 'none'
fail_on_error:
description: |
Deprecated, use `fail_level` instead.
Exit code for reviewdog when errors are found [true,false]
Default is `false`.
deprecationMessage: Deprecated, use `fail_level` instead.
default: 'false'
reviewdog_flags:
description: 'Additional reviewdog flags'
default: ''
### Flags for ###
src:
description: "Flags and args of eslint command. Default: 'src/*.nim'"
default: 'src/*.nim'
```## Usage
```yaml
name: nimlinton: [pull_request]
jobs:
nimlint:
name: runner / nimlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0- name: nimlint-github-pr-review
- uses: reviewdog/action-nimlint@416761c7a147bdf56c31d75b01bd133a52402ea1 # v1.19.0
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review # Change reporter.
src: 'src/*.nim'
```## Development
### Release
#### [haya14busa/action-bumpr](https://github.com/haya14busa/action-bumpr)
You can bump version on merging Pull Requests with specific labels (bump:major,bump:minor,bump:patch).
Pushing tag manually by yourself also work.#### [haya14busa/action-update-semver](https://github.com/haya14busa/action-update-semver)
This action updates major/minor release tags on a tag push. e.g. Update v1 and v1.2 tag when released v1.2.3.
ref: https://help.github.com/en/articles/about-actions#versioning-your-action### Lint - reviewdog integration
This reviewdog action template itself is integrated with reviewdog to run lints
which is useful for Docker container based actions.
Supported linters:
- [reviewdog/action-shellcheck](https://github.com/reviewdog/action-shellcheck)
- [reviewdog/action-hadolint](https://github.com/reviewdog/action-hadolint)
- [reviewdog/action-misspell](https://github.com/reviewdog/action-misspell)### Dependencies Update Automation
This repository uses [haya14busa/action-depup](https://github.com/haya14busa/action-depup) to update
reviewdog version.[](https://github.com/reviewdog/action-nimlint/pull/6)