generated from deploymenttheory/Template
-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (37 loc) · 1.33 KB
/
linter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Linter
on:
pull_request:
paths-ignore:
- '.github/**'
permissions:
contents: read
packages: read
statuses: write # To report GitHub Actions status checks
jobs:
build:
name: Linter
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- name: Checkout Code
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Lint Code Base with Super-Linter
uses: super-linter/super-linter@v7.1.0
env:
DEFAULT_BRANCH: origin/main
VALIDATE_ALL_CODEBASE: false # tells the linter to only check files that have been modified in the current pull request
VALIDATE_GO: true
VALIDATE_GOFMT: true
VALIDATE_GOCYCLO: true
VALIDATE_GOVET: true
VALIDATE_GOLANGCI_LINT: true
VALIDATE_CPD: false # Disable CPD (Copy Paste Detection) for all languages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # To report GitHub Actions status checks
MARKDOWN_CONFIG_FILE: .markdown-lint.yml
FILTER_REGEX_EXCLUDE: |
.*\.md$| # Exclude all markdown files
.*test/.*| # Exclude all files in any test directory
.*_test\.go$| # Exclude Go test files (e.g., *_test.go)
.*\.json$ # Exclude all JSON files