Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fedora-copr/vcs-diff-lint-action
Differential code linting GitHub action
https://github.com/fedora-copr/vcs-diff-lint-action
Last synced: about 5 hours ago
JSON representation
Differential code linting GitHub action
- Host: GitHub
- URL: https://github.com/fedora-copr/vcs-diff-lint-action
- Owner: fedora-copr
- Created: 2022-10-24T08:42:48.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-25T20:04:35.000Z (7 months ago)
- Last Synced: 2024-06-11T16:55:52.997Z (5 months ago)
- Language: Shell
- Size: 22.5 KB
- Stars: 2
- Watchers: 6
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitHub Action for differential code linting
This action is built on top of [VCS Diff Lint](https://github.com/fedora-copr/vcs-diff-lint) tool.
## Example
```yml
name: Differential Linterson:
# For push, we "do nothing". But it needs to be specified, see #17
push:
pull_request:
branches: [ main ]permissions:
contents: readjobs:
lint:
runs-on: ubuntu-latestpermissions:
# required for all workflows
security-events: write# only required for workflows in private repositories
actions: read
contents: readsteps:
- name: Repository checkout
uses: actions/checkout@v4- id: VCS_Diff_Lint
name: VCS Diff Lint
uses: fedora-copr/vcs-diff-lint-action@v1- name: Upload artifact with detected defects in SARIF format
uses: actions/upload-artifact@v4
with:
name: VCS Diff Lint SARIF
path: ${{ steps.VCS_Diff_Lint.outputs.sarif }}
if: ${{ always() }}- name: Upload SARIF to GitHub using github/codeql-action/upload-sarif
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.VCS_Diff_Lint.outputs.sarif }}
if: ${{ always() }}
```## Options
```yml
# ...- name: VCS Diff Lint
uses: fedora-copr/vcs-diff-lint-action@v1
with:
subdirectory:
subdirectories:
linter_tags:
debug:# ...
```### subdirectory
Sub-directory to step in before the linting is performed. The sub-directory must contain the `.vcs-diff-lint.yml` file, or RPM spec file.
* default value: `undefined`
* requirements: `optional`### subdirectories
Equivalent to `subdirectory` option, but multiplied. Space separated list of sub-directories to analyze. The linter is executed multiple times, for each sub-diretory separately.
* default value: `undefined`
* requirements: `optional`### linter_tags
Space-separated list of linter tags (selectors) for the `vcs-diff-lint` utility
(see the `--linter-tags` option). By default all linters are selected. Avaliable
linter tags are `mypy`, `pylint`, `ruff`, and `python`.* default value: `undefined`
* requirements: `optional`### install\_rpm\_packages
Space-separated list of RPM packages that are automatically installed into the
testing environment (= Docker container).* default value: `undefined`
* requirements: `optional`### debug
Turn on debugging info.
* default value: `false`
* requirements: `optional`## Outputs
VCS Diff Lint GitHub Action exposes following [outputs](https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs).
### sarif
Relative path to SARIF file containing detected defects.