-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chore: Apply fixes from MegaLinter reports
- Loading branch information
Showing
16 changed files
with
282 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
compact: true # For the CLI output, do not display code blocks | ||
quiet: true # For the CLI output, display only failed checks. Also disables progress bars | ||
evaluate-variables: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"language": "en", | ||
"noConfigSearch": true, | ||
"words": ["megalinter", "oxsecurity"], | ||
"dictionaries": ["project-dict", "go", "filetypes", "softwareTerms", "misc"], | ||
"dictionaryDefinitions": [ | ||
{ | ||
"name": "project-dict", | ||
"path": "./project-dict.txt", | ||
"useCompounds": true | ||
} | ||
], | ||
"ignorePaths": [ | ||
"**/node_modules/**", | ||
"**/vscode-extension/**", | ||
"**/.git/**", | ||
"**/.pnpm-lock.json", | ||
".vscode", | ||
"megalinter", | ||
"package-lock.json", | ||
"report", | ||
".ml-reports/**" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Visit https://golangci-lint.run/ for usage documentation | ||
# and information on other useful linters | ||
issues: | ||
max-issues-per-linter: 30 | ||
max-same-issues: 0 | ||
exclude-rules: | ||
- path: '(.+)_test\.go' | ||
linters: | ||
- unparam | ||
- forcetypeassert | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- durationcheck | ||
- errcheck | ||
- forcetypeassert | ||
- godot | ||
- gofmt | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- makezero | ||
- misspell | ||
- nilerr | ||
- predeclared | ||
- staticcheck | ||
- tenv | ||
- unconvert | ||
- unparam | ||
- unused |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"threshold": 20, | ||
"minLines": 15, | ||
"reporters": ["html", "markdown"], | ||
"ignore": [ | ||
"**/node_modules/**", | ||
"**/.git/**", | ||
"**/.rbenv/**", | ||
"**/.venv/**", | ||
"**/*cache*/**", | ||
"**/.github/**", | ||
"**/.idea/**", | ||
"**/report/**", | ||
"**/.ml-reports/**", | ||
"**/*.svg", | ||
"**/*_test.go", | ||
"./examples/**", | ||
"./docs/**" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"ignorePatterns": [ | ||
{ "pattern": "^#.+" } | ||
], | ||
"retryOn429": true, | ||
"retryCount": 3, | ||
"aliveStatusCodes": [200, 203] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Default state for all rules | ||
default: true | ||
|
||
# MD007/ul-indent - Unordered list indentation | ||
MD007: | ||
# Spaces for indent | ||
indent: 2 | ||
|
||
# MD013/line-length - Line length | ||
MD013: | ||
line_length: 120 | ||
tables: false | ||
code_blocks: false | ||
|
||
# MD026/no-trailing-punctuation - Trailing punctuation in heading | ||
MD026: | ||
# Punctuation characters | ||
punctuation: ".,;:!。,;:!" | ||
|
||
# MD029/ol-prefix - Ordered list item prefix | ||
MD029: false | ||
|
||
# MD033/no-inline-html - Inline HTML | ||
MD033: false | ||
|
||
# MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading | ||
MD036: false | ||
|
||
# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading | ||
MD041: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
ignoreGeneratedHeader = false | ||
severity = "warning" | ||
confidence = 0.8 | ||
errorCode = 0 | ||
warningCode = 0 | ||
|
||
[rule.blank-imports] | ||
[rule.context-as-argument] | ||
[rule.context-keys-type] | ||
[rule.dot-imports] | ||
[rule.error-return] | ||
[rule.error-strings] | ||
[rule.error-naming] | ||
[rule.increment-decrement] | ||
[rule.var-naming] | ||
[rule.var-declaration] | ||
[rule.range] | ||
[rule.receiver-naming] | ||
[rule.time-naming] | ||
[rule.unexported-return] | ||
[rule.indent-error-flow] | ||
[rule.errorf] | ||
[rule.empty-block] | ||
[rule.superfluous-else] | ||
[rule.unused-parameter] | ||
[rule.unreachable-code] | ||
[rule.redefines-builtin-id] | ||
|
||
# disabled from the recommended rules | ||
# [rule.package-comments] | ||
# [rule.exported] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
extends: default | ||
rules: | ||
empty-lines: | ||
max: 1 | ||
max-start: 0 | ||
max-end: 0 | ||
new-lines: | ||
level: warning | ||
type: unix | ||
line-length: | ||
max: 150 | ||
comments: | ||
min-spaces-from-content: 1 | ||
document-start: false | ||
document-end: false | ||
new-line-at-end-of-file: enable | ||
truthy: | ||
check-keys: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
basetypes | ||
coverprofile | ||
datasource | ||
durationcheck | ||
errcheck | ||
exportloopref | ||
forcetypeassert | ||
goarch | ||
gofmt | ||
GOLANGCI | ||
golangci | ||
gomod | ||
goreleaser | ||
gosimple | ||
govet | ||
ineffassign | ||
inventium | ||
knownvalue | ||
ldflags | ||
makezero | ||
MARKDOWNLINT | ||
markdownlint | ||
megalinter | ||
nilerr | ||
oxsecurity | ||
predeclared | ||
providerserver | ||
refucktor | ||
sonarcloud | ||
sonarsource | ||
statecheck | ||
staticcheck | ||
stringvalidator | ||
tenv | ||
terraformterraform | ||
tflog | ||
tfplugindocs | ||
tfprotov | ||
tfversion | ||
trimpath | ||
unconvert | ||
unparam | ||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Configuration file for MegaLinter | ||
# | ||
# See all available variables at https://megalinter.io/latest/config-file/ and in linters documentation | ||
|
||
# all, none, or list of linter keys | ||
APPLY_FIXES: # all, none, or list of linter keys | ||
- JSON_PRETTIER | ||
- YAML_YAMLLINT | ||
ENABLE_LINTERS: # If you use ENABLE_LINTERS variable, all other linters will be disabled by default | ||
- COPYPASTE_JSCPD # https://megalinter.io/latest/descriptors/copypaste_jscpd/ | ||
# - GO_GOLANGCI_LINT # https://megalinter.io/latest/descriptors/go_golangci_lint/ # missing support for Go 1.23 | ||
- GO_REVIVE # https://megalinter.io/latest/descriptors/go_revive/ | ||
- JSON_PRETTIER # https://megalinter.io/latest/descriptors/json_prettier/ | ||
- MARKDOWN_MARKDOWN_LINK_CHECK # https://megalinter.io/latest/descriptors/markdown_markdown_link_check/ | ||
- MARKDOWN_MARKDOWNLINT # https://megalinter.io/latest/descriptors/markdown_markdownlint/ | ||
- REPOSITORY_CHECKOV # https://megalinter.io/latest/descriptors/repository_checkov/ | ||
- SPELL_CSPELL # https://megalinter.io/latest/descriptors/spell_cspell/ | ||
- YAML_YAMLLINT # https://megalinter.io/latest/descriptors/yaml_yamllint/ | ||
|
||
CLEAR_REPORT_FOLDER: true | ||
CONFIG_PROPERTIES_TO_APPEND: | ||
- ADDITIONAL_EXCLUDED_DIRECTORIES | ||
CONFIG_REPORTER: false | ||
FAIL_IF_MISSING_LINTER_IN_FLAVOR: true | ||
FORMATTERS_DISABLE_ERRORS: false | ||
IGNORE_GENERATED_FILES: true | ||
LINTER_RULES_PATH: .linters | ||
PRINT_ALPACA: false | ||
REPORT_OUTPUT_FOLDER: /tmp/lint/.ml-reports | ||
SHOW_ELAPSED_TIME: true | ||
UPDATED_SOURCES_REPORTER: false | ||
|
||
ADDITIONAL_EXCLUDED_DIRECTORIES: | ||
- '.archived' | ||
- 'docs' | ||
- 'examples' | ||
- '.git' | ||
- '.linters' | ||
- '.vscode' | ||
- '.idea' | ||
|
||
# MARKDOWN_MARKDOWNLINT variables | ||
MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .markdownlint.yml | ||
|
||
# YAML_YAMLLINT variables | ||
YAML_YAMLLINT_CONFIG_FILE: .yamllint.yml | ||
|
||
# JSON_PRETTIER variables | ||
JSON_PRETTIER_CONFIG_FILE: .prettierrc.yml | ||
|
||
# GO_REVIVE | ||
GO_REVIVE_CONFIG_FILE: .revive.toml | ||
|
||
# GO_GOLANGCI_LINT | ||
GO_GOLANGCI_LINT_CONFIG_FILE: .golangci.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.