Skip to content

Commit

Permalink
feat: reviewdog support
Browse files Browse the repository at this point in the history
  • Loading branch information
misumisumi committed Mar 25, 2024
1 parent 0581866 commit eb2173f
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: reviewdog
on:
push:
branch-ignore:
- "update_flake_lock_action"
tags:
- "*"
paths:
- "*"
pull_request:

jobs:
reviewdog:
name: reviewdog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- run: nix profile install nixpkgs#statix nixpkgs#typo
- name: Run reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
reviewdog -reporter=github-pr-review -filter-mode=file -fail-on-error
9 changes: 9 additions & 0 deletions .reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
runner:
statix:
cmd: statix check -o errfmt | cat
errorformat:
- "%f>%l:%c:%t:%n:%m"
level: warning
typos:
cmd: typos
format: typos
6 changes: 6 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[default]
[default.extend-words]
hda = "hda"

[files]
extend-exclude = ["sops"]

0 comments on commit eb2173f

Please sign in to comment.