-
Notifications
You must be signed in to change notification settings - Fork 28
69 lines (62 loc) · 2.14 KB
/
linter.yaml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
#################################
## Super Linter GitHub Actions
## https://github.com/github/super-linter
#################################
name: linter
# only run during PRs or manually
on:
pull_request:
branches: [main]
workflow_dispatch:
# Set permissions to be read only
permissions: read-all
jobs:
build:
name: Lint Code Base
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper
# list of changed files within `super-linter`
fetch-depth: 0
################################
# Run Linter against code base
# each step will run even if one fails
# this is accomplished with the 'if: ${{ success() || failure() }}'
################################
- name: Lint YAML
if: ${{ success() || failure() }}
uses: github/super-linter/slim@v5
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
FILTER_REGEX_EXCLUDE: gcloud/.*
LINTER_RULES_PATH: .github/linter-rules
VALIDATE_YAML: true
YAML_CONFIG_FILE: .yaml-lint-config.yaml
# the linter-rules file for bash (.shellcheckrc) needs to exists in the repo's root
# use 'SHELLCHECK_OPTS' instead to ignore certain errors and/or add command options
# https://github.com/koalaman/shellcheck/blob/master/shellcheck.1.md
- name: Lint Bash
if: ${{ success() || failure() }}
uses: github/super-linter/slim@v5
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
FILTER_REGEX_EXCLUDE: gcloud/.*
VALIDATE_BASH: true
SHELLCHECK_OPTS: "--severity=info"
# Super-Linter markdown validation
- name: Lint Markdown
if: ${{ success() || failure() }}
uses: github/super-linter/slim@v5
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
FILTER_REGEX_EXCLUDE: gcloud/.*
LINTER_RULES_PATH: .github/linter-rules
VALIDATE_MARKDOWN: true
MARKDOWN_CONFIG_FILE: .markdown-lint-config.yaml