Skip to content

Commit

Permalink
feat: Add MegaLinter configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ragdata committed Jul 27, 2024
1 parent c1d4612 commit 5f9f319
Show file tree
Hide file tree
Showing 10 changed files with 627 additions and 0 deletions.
47 changes: 47 additions & 0 deletions template-configs/megalinter/.mega-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
####################################################################
# .mega-linter.yml
####################################################################
# MegaLinter Configuration File
# See all available variables at https://megalinter.io/configuration/ and in linters documentation

APPLY_FIXES: all
# ENABLE: # If you use ENABLE variable, all other languages/formats/tooling formats will be disabled by default
# If you use ENABLE_LINTERS variable, all other linters will be disabled by default
ENABLE_LINTERS:
- ACTION_ACTIONLINT
- ANSIBLE_ANSIBLE_LINT
- BASH_EXEC
- BASH_SHELLCHECK
- DOCKERFILE_HADOLINT
- ENV_DOTENV_LINTER
- HTML_HTMLHINT
- JAVASCRIPT_STANDARD
- JSON_JSONLINT
- MARKDOWN_MARKDOWNLINT
- MARKDOWN_MARKDOWN_LINK_CHECK
- PHP_PHPSTAN
- POWERSHELL_POWERSHELL
- PYTHON_PYLINT
- REPOSITORY_GITLEAKS
- REPOSITORY_TRIVY
- RUBY_RUBOCOP
- SPELL_PROSELINT
- SQL_SQL_LINT
- TYPESCRIPT_STANDARD
- XML_XMLLINT
- YAML_YAMLLINT
# DISABLE: If you use DISABLE variable, the linters in the listed descriptors will be skipped
# DISABLE_LINTERS: # If you use DISABLE_LINTERS variable, the listed linters will be skipped
PRINT_ALL_FILES: false
FILTER_REGEX_EXCLUDE: (\.automation|\.idea|\.vscode|\.venv)
BASH_FILTER_REGEX_EXCLUDE: "(lib)"
MARKDOWN_MARKDOWN_LINK_CHECK_DISABLE_ERRORS: true
DOCKERFILE_HADOLINT_ARGUMENTS: "--ignore DL3008"
SHOW_ELAPSED_TIME: true
FLAVOR_SUGGESTIONS: false
EMAIL_REPORTER: false
FILEIO_REPORTER: false
JSON_REPORTER: true
GITHUB_STATUS_REPORTER: true
REPOSITORY_TRIVY_CONFIG_FILE: .trivy.yml
REPOSITORY_TRIVY_DISABLE_ERRORS: true
18 changes: 18 additions & 0 deletions template-configs/megalinter/linters/.gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
title = "gitleaks config"

[extend]
# useDefault will extend the base configuration with the default gitleaks config:
# https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml
useDefault = true

[allowlist]
description = "Allowlisted files"
paths = [
'''.automation/test''',
'''megalinter-reports''',
'''.github/linters''',
'''node_modules''',
'''.mypy_cache''',
'''(.*?)gitleaks\.toml$''',
'''(.*?)(png|jpg|gif|doc|docx|pdf|bin|xls|pyc|zip)$''',
'''(go.mod|go.sum)$''']
9 changes: 9 additions & 0 deletions template-configs/megalinter/linters/.hadolint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ignored:
- DL3007
- DL3016
- DL3018
- DL3028
- DL3059
- SC2086
- SC2039
- SC3046
25 changes: 25 additions & 0 deletions template-configs/megalinter/linters/.htmlhintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"tagname-lowercase": true,
"attr-lowercase": true,
"attr-value-double-quotes": true,
"attr-value-not-empty": false,
"attr-no-duplication": true,
"doctype-first": true,
"tag-pair": true,
"tag-self-close": false,
"spec-char-escape": true,
"id-unique": true,
"src-not-empty": true,
"title-require": true,
"alt-require": true,
"doctype-html5": true,
"id-class-value": "dash",
"style-disabled": false,
"inline-style-disabled": false,
"inline-script-disabled": false,
"space-tab-mixed-disabled": "space",
"id-class-ad-disabled": false,
"href-abs-or-rel": false,
"attr-unsafe-chars": true,
"head-script-disabled": true
}
9 changes: 9 additions & 0 deletions template-configs/megalinter/linters/.markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"retryOn429": true,
"retryCount": 10,
"ignorePatterns": [
{
"pattern": "(github\\.com/oxsecurity/megalinter/tree/main/docs)"
}
]
}
17 changes: 17 additions & 0 deletions template-configs/megalinter/linters/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"MD004": false,
"MD007": {
"indent": 2
},
"MD013": {
"line_length": 600
},
"MD026": {
"punctuation": ".,;:!。,;:"
},
"MD029": false,
"MD033": false,
"MD036": false,
"MD041": false,
"blank_lines": false
}
Loading

0 comments on commit 5f9f319

Please sign in to comment.