Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 (lint): Adds various reviewdog linters #17

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ updates:
prefix: "⬆️ (deps-tf):"

- package-ecosystem: "gomod"
directory: "/test"
directory: "/"
schedule:
interval: "weekly"
groups:
Expand All @@ -38,4 +38,3 @@ updates:
- "patch"
commit-message:
prefix: "⬆️ (deps-ghaction):"

101 changes: 101 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Lint

on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened]

jobs:
golangci-lint:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ github.token }}
reporter: github-pr-review
fail_on_error: "false"
filter_mode: file
workdir: test/
go_version_file: test/go.mod
golangci_lint_flags: --verbose --presets bugs,comment,complexity,error,format,import,metalinter,module,performance,style,unused --fast --exclude-use-default --tests --timeout 120s ./...
prettier:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: create package.json
run: |
echo -e '{"devDependencies": {"prettier": "^3.1.0"}}' > package.json
- name: prettier
uses: EPMatt/reviewdog-action-prettier@v1
with:
github_token: ${{ github.token }}
reporter: github-pr-review
fail_on_error: "false"
filter_mode: file
misspell:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: misspell
uses: reviewdog/action-misspell@v1
with:
github_token: ${{ github.token }}
reporter: github-pr-review
fail_on_error: "false"
filter_mode: file
exclude: |
./.git/*
./.cache/*
alex:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: alex
uses: reviewdog/action-alex@v1
with:
github_token: ${{ github.token }}
reporter: github-pr-review
fail_on_error: "false"
filter_mode: file
alex_flags: |
* .github/* .github/workflows/* docs/* test/* examples/complete/*
markdownlint:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: markdownlint
uses: reviewdog/action-markdownlint@v0
with:
github_token: ${{ github.token }}
reporter: github-pr-review
fail_on_error: "false"
filter_mode: file
markdownlint_flags: |
--disable MD033 -- .
actionlint:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: actionlint
uses: reviewdog/action-actionlint@v1
with:
github_token: ${{ github.token }}
reporter: github-pr-review
fail_on_error: "false"
filter_mode: file
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Pull Request
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
types: [opened, synchronize, reopened, closed, labeled, unlabeled]

jobs:
Expand All @@ -13,4 +13,4 @@ jobs:
- name: Run Terratest
uses: cloudposse/github-action-terratest@main
with:
sourceDir: test
sourceDir: test
Loading
Loading