-
Notifications
You must be signed in to change notification settings - Fork 0
/
.mega-linter.yml
363 lines (276 loc) · 11.3 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
---
# MegaLinter Configuration File
# This file configures MegaLinter to run various linters on your project.
# You can customize which linters to enable or disable and set their configurations.
#
# For detailed information about configuration variables, visit:
# https://megalinter.io/latest/config-variables/
# Other references:
# https://megalinter.io/latest/
# https://megalinter.io/latest/config-file/
# https://megalinter.io/latest/mega-linter-runner/
# https://megalinter.io/latest/install-github/
# https://github.com/oxsecurity/megalinter
# https://megalinter.io/latest/config-precommands/
# https://megalinter.io/latest/config-postcommands/
# https://megalinter.io/latest/config-variables-security/
# https://megalinter.io/latest/reporters/
# General Configuration
# ---------------------
# This section contains general settings that apply to MegaLinter as a whole.
# List of additional excluded directory basenames. They're excluded at any nested level.
ADDITIONAL_EXCLUDED_DIRECTORIES:
- .cache
# Activates formatting and autofix.
# Options: 'all', 'none', or a list of linter keys.
# Set to 'all' to apply fixes from all linters.
APPLY_FIXES: all
# Flag to clear files from the report folder before starting the linting process.
CLEAR_REPORT_FOLDER: true
# List of configuration properties to append their values (instead of replacing them) in case of using EXTENDS.
CONFIG_PROPERTIES_TO_APPEND: []
# Deprecated: The name of the repository's default branch.
DEFAULT_BRANCH: "HEAD"
# The location containing files to lint if you are running locally.
DEFAULT_WORKSPACE: "."
# List of disabled descriptors keys.
DISABLE: []
# Flag to have the linter complete with exit code 0 even if errors were detected.
# Set to 'true' if you want MegaLinter to detect errors but not block CI from passing.
DISABLE_ERRORS: false
# List of enabled but not blocking linters keys.
DISABLE_ERRORS_LINTERS: []
# List of disabled linters keys.
DISABLE_LINTERS: []
# For example:
# DISABLE_LINTERS:
# - COPYPASTE # Disable copy-paste detection.
# - SPELL # Disable spelling checks.
# List of enabled descriptors keys.
ENABLE: [
PYTHON
]
# List of enabled linters keys.
# If you use ENABLE_LINTERS, all other linters will be disabled by default.
# ENABLE_LINTERS: [
# PYTHON_RUFF
# ]
# List of excluded directory basenames. They're excluded at any nested level.
EXCLUDED_DIRECTORIES:
- .git
- .cache
- .svn
- .hg
- .bzr
- node_modules
- bower_components
- vendor
- .history
- .venv
- venv
# Base mega-linter.yml config file(s) to extend local configuration from.
# Can be a single URL or a list of .mega-linter.yml config files URLs.
# Later files take precedence.
EXTENDS: []
# If set to true, MegaLinter fails if a linter is missing in the selected flavor.
FAIL_IF_MISSING_LINTER_IN_FLAVOR: false
# If set to true, MegaLinter fails if a linter or formatter has autofixed sources, even if there are no errors.
FAIL_IF_UPDATED_SOURCES: false
# Regular expression defining which files will be excluded from linting.
# FILTER_REGEX_EXCLUDE: ""
# For example, to exclude test files: FILTER_REGEX_EXCLUDE: '.*src/test.*'
# Regular expression defining which files will be processed by linters.
# FILTER_REGEX_INCLUDE: ""
# For example, to include only src files: FILTER_REGEX_INCLUDE: '.*src/.*'
# Provides suggestions about different MegaLinter flavors to use to improve runtime performances.
FLAVOR_SUGGESTIONS: true
# Formatter errors will be reported as errors (and not warnings) if this variable is set to false.
FORMATTERS_DISABLE_ERRORS: true
# If set, calls git with Authorization: Bearer + value.
# GIT_AUTHORIZATION_BEARER: ""
# Base directory for REPORT_OUTPUT_FOLDER, for user-defined linter rules location, for location of linted files if DEFAULT_WORKSPACE isn't set.
# GITHUB_WORKSPACE: "${GITHUB_WORKSPACE}"
# If set to true, MegaLinter will skip files containing @generated marker but without @not-generated marker.
IGNORE_GENERATED_FILES: true
# If set to true, MegaLinter will skip files ignored by git using .gitignore file.
IGNORE_GITIGNORED_FILES: true
# JavaScript default style to check/apply. Options: 'standard', 'prettier'.
JAVASCRIPT_DEFAULT_STYLE: "prettier"
# Directory for all linter configuration rules.
# Can be a local folder or a remote URL.
# LINTER_RULES_PATH: ".github/linters"
# The file name for outputting logs. All output is sent to the log file regardless of LOG_LEVEL.
# Use 'none' to not generate this file.
LOG_FILE: mega-linter.log
# How much output the script will generate to the console. One of 'INFO', 'DEBUG', 'WARNING', or 'ERROR'.
LOG_LEVEL: "INFO"
# Markdown default style to check/apply. Options: 'markdownlint', 'remark-lint'.
MARKDOWN_DEFAULT_STYLE: "markdownlint"
# Name of MegaLinter configuration file.
# Can be defined remotely; in that case, set this variable with the remote URL of the config file.
# MEGALINTER_CONFIG: ".mega-linter.yml"
# Comma-separated list of files to analyze. Using this variable will bypass other file listing methods.
MEGALINTER_FILES_TO_LINT: []
# Process linters in parallel to improve overall MegaLinter performance.
PARALLEL: true
# All available cores are used by default.
# If there are too many, you need to decrease the number to enhance performance.
# PARALLEL_PROCESS_NUMBER: ""
# List of plugin URLs to install and run during MegaLinter run.
PLUGINS: []
# Custom bash commands to run after linters.
POST_COMMANDS: []
# Custom bash commands to run before linters.
PRE_COMMANDS: []
# Display all files analyzed by the linter instead of only the number.
PRINT_ALL_FILES: true
# Enable printing alpaca image to console.
PRINT_ALPACA: true
# Directory for generating report files. Set to 'none' to not generate reports.
REPORT_OUTPUT_FOLDER: .cache/megalinter/reports
# Additional list of secured environment variables to hide when calling linters.
SECURED_ENV_VARIABLES: []
# List of secured environment variables to hide when calling linters.
# Default list includes MegaLinter & CI platforms sensitive variables.
# This is not recommended to override; use SECURED_ENV_VARIABLES instead.
# SECURED_ENV_VARIABLES_DEFAULT: []
# Displays elapsed time in reports.
SHOW_ELAPSED_TIME: true
# Displays all disabled linters MegaLinter could have run.
SHOW_SKIPPED_LINTERS: true
# Comma-separated list of cli_lint_modes to skip.
# Use if you want to skip linters with some CLI lint modes (e.g., 'file', 'project').
# Available values: 'file', 'cli_lint_mode', 'project'.
SKIP_CLI_LINT_MODES: []
# TypeScript default style to check/apply. Options: 'standard', 'prettier'.
TYPESCRIPT_DEFAULT_STYLE: "prettier"
# Will parse the entire repository and find all files to validate across all types.
# NOTE: When set to false, only new or edited files will be parsed for validation.
VALIDATE_ALL_CODEBASE: true
# Linter-Specific Configurations
# ------------------------------
# This section allows you to configure each linter individually.
# Python Linters
# --------------
# Configure linters for Python files.
# Pylint Configuration
# Flake8 Configuration
# JavaScript Linters
# ------------------
# Configure linters for JavaScript files.
# TypeScript Linters
# ------------------
# Configure linters for TypeScript files.
# CSS Linters
# -----------
# Configure linters for CSS files.
# Stylelint Configuration
# Markdownlint Configuration
# YAML Linters
# ------------
# Configure linters for YAML files.
# Yamllint Configuration
# JSON Linters
# ------------
# Configure linters for JSON files.
# JSONLint Configuration
# Python
# ----------------
PYTHON_BLACK_CONFIG_FILE: pyproject.toml
PYTHON_FLAKE8_CONFIG_FILE: pyproject.toml
PYTHON_BANDIT_CONFIG_FILE: pyproject.toml
PYTHON_PYLINT_CONFIG_FILE: .pylintrc
PYTHON_PYRIGHT_CONFIG_FILE: pyproject.toml
PYTHON_ISORT_CONFIG_FILE: pyproject.toml
PYTHON_RUFF_CONFIG_FILE: pyproject.toml
PYTHON_MYPY_CONFIG_FILE: pyproject.toml
# ----------------
# Reporters
# ----------------
# API Reporter
# https://megalinter.io/latest/reporters/ApiReporter/
# Azure Comment Reporter
# https://megalinter.io/latest/reporters/AzureCommentReporter/
AZURE_COMMENT_REPORTER: false
AZURE_COMMENT_REPORTER_LINKS_TYPE: artifacts
# Bitbucket Comment Reporter
# https://megalinter.io/latest/reporters/BitbucketCommentReporter/
BITBUCKET_COMMENT_REPORTER: false
BITBUCKET_COMMENT_REPORTER_OVERWRITE_COMMENT: true
# BITBUCKET_REPO_ACCESS_TOKEN: ""
# Console Reporter
# https://megalinter.io/latest/reporters/ConsoleReporter/
CONSOLE_REPORTER: true
CONSOLE_REPORTER_SECTIONS: true
OUTPUT_DETAIL: detailed
# Config Reporter
# https://megalinter.io/latest/reporters/ConfigReporter/
CONFIG_REPORTER: true
CONFIG_REPORTER_SUB_FOLDER: IDE-config
# File.io Reporter
# https://megalinter.io/latest/reporters/FileIoReporter/
FILEIO_REPORTER: false
FILEIO_REPORTER_SEND_SUCCESS: false
# GitHub Status Reporter
# https://megalinter.io/latest/reporters/GitHubStatusReporter/
GITHUB_STATUS_REPORTER: false
GITHUB_API_URL: https://api.github.com
GITHUB_SERVER_URL: https://github.com
# GitHub Comment Reporter
# https://megalinter.io/latest/reporters/GitHubCommentReporter/
GITHUB_COMMENT_REPORTER: false
# Gitlab Comment Reporter
# https://megalinter.io/latest/reporters/GitlabCommentReporter/
GITLAB_COMMENT_REPORTER: false
GITLAB_COMMENT_REPORTER_OVERWRITE_COMMENT: true
# GITLAB_ACCESS_TOKEN_MEGALINTER: ""
# GITLAB_CUSTOM_CERTIFICATE: ""
# GITLAB_CERTIFICATE_PATH: ""
# Text Reporter
# https://megalinter.io/latest/reporters/TextReporter/
TEXT_REPORTER: true
TEXT_REPORTER_SUB_FOLDER: linters_logs
# JSON Reporter
# https://megalinter.io/latest/reporters/JsonReporter/
JSON_REPORTER: true
JSON_REPORTER_OUTPUT_DETAIL: detailed
# Sarif Reporter
# https://megalinter.io/latest/reporters/SarifReporter/
SARIF_REPORTER: true
SARIF_REPORTER_FILE_NAME: mega-linter-report.sarif
SARIF_REPORTER_LINTERS: []
# Updated Sources Reporter
# https://megalinter.io/latest/reporters/UpdatedSourcesReporter/
UPDATED_SOURCES_REPORTER: true
UPDATED_SOURCES_REPORTER_DIR: updated_sources
# TAP Reporter
# https://megalinter.io/latest/reporters/TapReporter/
TAP_REPORTER: false
TAP_REPORTER_SUB_FOLDER: tap
# Email Reporter
# https://megalinter.io/latest/reporters/EmailReporter/
EMAIL_REPORTER: false
EMAIL_REPORTER_EMAIL: [email protected]
EMAIL_REPORTER_SEND_SUCCESS: false
EMAIL_REPORTER_SENDER: [email protected]
EMAIL_REPORTER_SMTP_HOST: smtp.gmail.com
EMAIL_REPORTER_SMTP_PORT: 465
EMAIL_REPORTER_SMTP_USERNAME: [email protected]
# EMAIL_REPORTER_SMTP_PASSWORD: password
# Markdown Summary Reporter
# https://megalinter.io/latest/reporters/MarkdownSummaryReporter/
MARKDOWN_SUMMARY_REPORTER: true
MARKDOWN_SUMMARY_REPORTER_FILE_NAME: megalinter-report.md
REPORTERS_MARKDOWN_TYPE: advanced
# Add custom Markdown content to the job summary report generated by MegaLinter.
JOB_SUMMARY_ADDITIONAL_MARKDOWN: |
## 📋 Additional Information
Thank you for contributing to this project! 🙏
- **Documentation**: Please refer to our [Contribution Guidelines](./CONTRIBUTING.md) for more information.
- **Support**: If you encounter any issues, feel free to open an [issue](https://github.com/your-repo/issues) or reach out on [Slack](https://your-slack-link.com).
### Badges
![Build Status](https://github.com/your-repo/actions/workflows/ci.yml/badge.svg)
![MegaLinter](https://github.com/oxsecurity/mega-linter/workflows/MegaLinter/badge.svg)
### Notes
- Ensure all linting errors are resolved before merging.
- Remember to update the `CHANGELOG.md` if your changes are user-facing.