-
Notifications
You must be signed in to change notification settings - Fork 89
138 lines (129 loc) · 4.78 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
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#################################
#################################
## Super Linter GitHub Actions ##
#################################
#################################
name: Lint Code Base
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
#
# Documentation:
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
#############################
# Start the job on all push #
#############################
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
workflow_dispatch:
###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: [ ubuntu-latest ]
##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v3
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 #
################################
- name: Lint Code Base
uses: github/super-linter/slim@v4
env:
VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'workflow_dispatch' }}
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Skip autogenerated register files and internal use board files
FILTER_REGEX_EXCLUDE: (.*\/Libraries\/((CMSIS\/Device\/Maxim\/[^\/]*\/Include)|(PeriphDrivers\/Source\/[^\/]*))\/[^\/]*_regs\.h)|(.*\/Libraries\/Boards\/[^\/]*\/(BCB|Emulator|Simulation|ROM)[^\/]*\/.*)|(.*\/Examples\/[^\/]*\/Display\/lvgl-8\.0\.2\/.*)|(.*\/Examples\/[^\/]*\/Demo\/lv_conf.h)|(.*\/Libraries\/CMSIS\/5.9.0\/.*)|(.*\/Libraries\/CMSIS\/Include\/.*)|(.*\/Libraries\/Cordio\/.*)|(.*\/Libraries\/SDHC\/.*)|(.*\/Libraries\/lwIP\/.*)|(.*\/Examples\/[^\/]*\/CNN\/.*)
# Explicity turn off all linters except CPP
# SuperLinter Documentation says all we need to do is turn on the ones we want
# and the rest will be off, but that doesn't seem to be the case in practice.
VALIDATE_ANSIBLE: false
VALIDATE_ARM: false
VALIDATE_BASH: false
VALIDATE_BASH_EXEC: false
# VALIDATE_CPP: false
VALIDATE_CLANG_FORMAT: false
VALIDATE_CLOJURE: false
VALIDATE_CLOUDFORMATION: false
VALIDATE_COFFEESCRIPT: false
VALIDATE_CSHARP: false
VALIDATE_CSS: false
VALIDATE_DART: false
VALIDATE_DOCKERFILE_HADOLINT: false
VALIDATE_EDITORCONFIG: false
VALIDATE_ENV: false
VALIDATE_GHERKIN: false
VALIDATE_GITHUB_ACTIONS: false
VALIDATE_GITLEAKS: false
VALIDATE_GO: false
VALIDATE_GOOGLE_JAVA_FORMAT: false
VALIDATE_GROOVY: false
VALIDATE_HTML: false
VALIDATE_JAVA: false
VALIDATE_JAVASCRIPT_ES: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSCPD: false
VALIDATE_JSON: false
VALIDATE_JSX: false
VALIDATE_KOTLIN: false
VALIDATE_KOTLIN_ANDROID: false
VALIDATE_KUBERNETES_KUBEVAL: false
VALIDATE_LATEX: false
VALIDATE_LUA: false
VALIDATE_MARKDOWN: false
VALIDATE_NATURAL_LANGUAGE: false
VALIDATE_OPENAPI: false
VALIDATE_PERL: false
VALIDATE_PHP: false
VALIDATE_PHP_BUILTIN: false
VALIDATE_PHP_PHPCS: false
VALIDATE_PHP_PHPSTAN: false
VALIDATE_PHP_PSALM: false
VALIDATE_POWERSHELL: false
VALIDATE_PROTOBUF: false
VALIDATE_PYTHON: false
VALIDATE_PYTHON_BLACK: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_PYTHON_MYPY: false
VALIDATE_PYTHON_PYLINT: false
VALIDATE_R: false
VALIDATE_RAKU: false
VALIDATE_RUBY: false
VALIDATE_RUST_2015: false
VALIDATE_RUST_2018: false
VALIDATE_RUST_2021: false
VALIDATE_RUST_CLIPPY: false
VALIDATE_SCALAFMT: false
VALIDATE_SHELL_SHFMT: false
VALIDATE_SNAKEMAKE_LINT: false
VALIDATE_SNAKEMAKE_SNAKEFMT: false
VALIDATE_STATES: false
VALIDATE_SQL: false
VALIDATE_SQLFLUFF: false
VALIDATE_TEKTON: false
VALIDATE_TERRAFORM_TERRASCAN: false
VALIDATE_TERRAFORM_TFLINT: false
VALIDATE_TERRAGRUNT: false
VALIDATE_TSX: false
VALIDATE_TYPESCRIPT_STANDARD: false
VALIDATE_XML: false
VALIDATE_YAML: false