-
Notifications
You must be signed in to change notification settings - Fork 1
/
.mega-linter.yml
161 lines (146 loc) · 3.9 KB
/
.mega-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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
---
# Configuration file for MegaLinter
# See all available variables at https://megalinter.io/latest/config-file/ and in linters documentation
APPLY_FIXES: all # all, none, or list of linter keys
# ENABLE: # If you use ENABLE variable, all other languages/formats/tooling-formats will be disabled by default
# ENABLE_LINTERS: # If you use ENABLE_LINTERS variable, all other linters will be disabled by default
DISABLE:
- SQL
DISABLE_LINTERS:
- JAVASCRIPT_ES
- JAVASCRIPT_PRETTIER
- RUBY_RUBOCOP
- REPOSITORY_CHECKOV
- REPOSITORY_TRIVY
- REPOSITORY_KICS
- SPELL_VALE
- SPELL_LYCHEE
- SPELL_PROSELINT
- MARKDOWN_MARKDOWN_TABLE_FORMATTER
# DISABLE_ERRORS: true # Uncomment if you want MegaLinter to detect errors but not block CI to pass
EXCLUDED_DIRECTORIES:
- ".history"
- ".git"
- ".idea"
- "logs"
- "node_modules"
- "vendor"
FILTER_REGEX_EXCLUDE: |
(?x)(
\.git/|
\.history/|
\.idea/|
^vendor/|
^node_modules/
)
FILEIO_REPORTER: false
PRE_COMMANDS:
- command: env
cwd: "workspace"
- command: yarn add --dev eslint-plugin-json eslint-config-prettier
cwd: "workspace"
POST_COMMANDS:
# FIX files set as root user
# HOST_USER_ID and HOST_GROUP_ID set in package.json
- command: |
if [[ "${CI_MODE:0}" = "0" && "{HOST_USER_ID:-0}" != "0" && "{HOST_GROUP_ID:-0}" != "0" ]]; then
find . -user 0 -exec chown ${HOST_USER_ID}:${HOST_GROUP_ID} {} ';'
fi
cwd: "workspace"
# remove files generated by cspell
- command: find . -name '*megalinter_file_names_cspell.txt' -delete
cwd: "workspace"
PRINT_ALPACA: false
SHOW_ELAPSED_TIME: true
# Linters configurations
BASH_SHELLCHECK_FILTER_REGEX_EXCLUDE: |
(?x)(
^vendor/|
/testsData/
)
BASH_SHELLCHECK_ARGUMENTS: --source-path=/tmp/lint
BASH_SHFMT_ARGUMENTS: -i 2 -ci
REPOSITORY_SECRETLINT_CONFIG_FILE: .secretlintrc.yml
EDITORCONFIG_EDITORCONFIG_CHECKER_FILTER_REGEX_EXCLUDE: |
(?x)(
\.git/|
/testsData/.*\.(txt|help)|
^manualTests/data/|
^src/Log/testsData|
^Gemfile.lock$|
\.md$|
^.*-megalinter_file_names_cspell.txt|
testsData/.*\.result$
)
GIT_GIT_DIFF_PRE_COMMANDS:
- command: git config --global core.autocrlf false
continue_if_failed: false
- command: git config --global core.eol lf
continue_if_failed: false
- command: git config --global core.whitespace cr-at-eol,-trailing-space
continue_if_failed: false
- command: git config --global core.excludesfile .gitignore
continue_if_failed: false
- command: git config --global apply.whitespace fix
continue_if_failed: false
- command: git config --global --add safe.directory .git
continue_if_failed: false
IGNORE_GITIGNORED_FILES: true
IGNORE_GENERATED_FILES: true
JAVASCRIPT_DEFAULT_STYLE: prettier
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.js
JAVASCRIPT_ES_FILTER_REGEX_EXCLUDE: (report/)
JSON_ESLINT_PLUGIN_JSONC_FILE_NAME: .eslintrc.js
JSON_JSONLINT_FILTER_REGEX_EXCLUDE: |
(?x)(
\.vscode/.*\.json$
)
SPELL_CSPELL_CONFIG_FILE: cspell.yaml
SPELL_CSPELL_FILTER_REGEX_EXCLUDE: |
(?x)(
\.git/|
^\.history/|
IDE/.*/\.idea|
^.*-megalinter_file_names_cspell.txt|
^megalinter-reports/|
^pages/Commands.md|
^pages/FrameworkFullDoc.md|
^pages/README.md|
^pages/doc|
^pages/bashDoc|
^pages/tests|
^commit-msg.md$|
/testsData/|
\.svg$
)
SPELL_FILTER_REGEX_EXCLUDE: |
(?x)(
\.git/|
\.history/|
IDE/.*/\.idea|
\.svg
)
MARKDOWN_MARKDOWN_LINK_CHECK_FILTER_REGEX_EXCLUDE: |
(?x)(
^pages/Commands.md|
^pages/FrameworkFullDoc.md|
^pages/README.md|
^pages/doc|
^pages/bashDoc|
^pages/tests|
^pages/_sidebar.md
)
YAML_V8R_FILTER_REGEX_EXCLUDE: |
(?x)(
^\.secretlintrc\.yml$|
^\.grype\.yaml$
)
MARKDOWN_MARKDOWNLINT_FILTER_REGEX_EXCLUDE: |
(?x)(
^pages/Commands.md|
^pages/FrameworkFullDoc.md|
^pages/README.md|
^pages/doc|
^pages/bashDoc|
^pages/tests
)