mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
ci: introduce nixf-tidy-action
nixf-tidy-action is a nix linter based on libnixf. It detects deadcode, unused `rec`, and syntax errors.
nixf-tidy-action will only report warnings on changed files in diff (thus it will not be very pedantic).

This commit is contained in:
parent
0fc190144f
commit
1c04f8539e
1 changed files with 25 additions and 0 deletions
25
.github/workflows/nixf-tidy-action.yaml
vendored
Normal file
25
.github/workflows/nixf-tidy-action.yaml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
name: nixf-tidy code linter
|
||||||
|
|
||||||
|
on:
|
||||||
|
[ pull_request ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
nixf-tidy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 30
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: cachix/install-nix-action@v22
|
||||||
|
with:
|
||||||
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
extra_nix_config: |
|
||||||
|
trusted-public-keys = nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
||||||
|
substituters = https://nix-community.cachix.org https://cache.nixos.org/
|
||||||
|
- run: nix profile install github:nix-community/nixd#nixd
|
||||||
|
- uses: inclyc/nixf-tidy-action@v1
|
Loading…
Add table
Add a link
Reference in a new issue