-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add MegaLinter and linters' configs
MegaLinter config and linter configs for: - Dockerfiles - Editorconfig checker - Groovy - Markdown - Python - Shell scripts - Yaml files Resolves #17
- Loading branch information
1 parent
0845b9b
commit c268ce3
Showing
5 changed files
with
89 additions
and
0 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,25 @@ | ||
{ | ||
"extends": "recommended", | ||
"rules": { | ||
"basic.DeadCode": "off", | ||
"comments.ClassJavadoc": "off", | ||
"convention.CompileStatic": "off", | ||
"convention.MethodReturnTypeRequired": "off", | ||
"convention.NoDef": "off", | ||
"convention.VariableTypeRequired": "off", | ||
"formatting.ClassStartsWithBlankLine": "info", | ||
"formatting.ConsecutiveBlankLines": "off", | ||
"groovyism.ExplicitCallToEqualsMethod": "off", | ||
"groovyism.GStringExpressionWithinString": "off", | ||
"naming.FactoryMethodName": "off", | ||
"naming.VariableName": "off", | ||
"serialization.SerializableClassMustDefineSerialVersionUID": "info", | ||
"size.NestedBlockDepth": { | ||
"maxNestedBlockDepth": 10 | ||
}, | ||
"unnecessary.UnnecessaryGetter": "off", | ||
"unused.UnusedVariable": { | ||
"ignoreVariableNames": "_" | ||
} | ||
} | ||
} |
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,6 @@ | ||
--- | ||
########################## | ||
## Hadolint config file ## | ||
########################## | ||
ignored: | ||
- DL3018 |
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,9 @@ | ||
{ | ||
"heading-style": { | ||
"style": "atx" | ||
}, | ||
"line-length": { | ||
"line_length": 120 | ||
}, | ||
"no-multiple-blanks": 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,32 @@ | ||
ENABLE_LINTERS: | ||
- BASH_SHELLCHECK | ||
- DOCKERFILE_HADOLINT | ||
- EDITORCONFIG_EDITORCONFIG_CHECKER | ||
- GROOVY_NPM_GROOVY_LINT | ||
- MARKDOWN_MARKDOWNLINT | ||
- PYTHON_BLACK | ||
- YAML_YAMLLINT | ||
|
||
# npm-groovy-lint configuration | ||
GROOVY_NPM_GROOVY_LINT_FILE_EXTENSIONS: | ||
- .dsl | ||
- .gradle | ||
- .groovy | ||
- .Jenkinsfile | ||
GROOVY_NPM_GROOVY_LINT_FILE_NAMES_REGEX: | ||
- Jenkinsfile$ | ||
GROOVY_NPM_GROOVY_LINT_ARGUMENTS: --failon error | ||
|
||
# editorconfig checker configuration | ||
EDITORCONFIG_EDITORCONFIG_CHECKER_FILTER_REGEX_EXCLUDE: > | ||
(?x) ^gradlew | ^\.idea/.* | ^test/resources/callStacks/.* | ||
# general options | ||
CLEAR_REPORT_FOLDER: true | ||
PRINT_ALL_FILES: true | ||
PRINT_ALPACA: false | ||
SHOW_ELAPSED_TIME: true | ||
|
||
# reporter options | ||
CONFIG_REPORTER: false | ||
UPDATED_SOURCES_REPORTER: 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,17 @@ | ||
--- | ||
########################################### | ||
# These are the rules used for # | ||
# linting all the yaml files in the stack # | ||
# NOTE: # | ||
# You can disable line with: # | ||
# # yamllint disable-line # | ||
########################################### | ||
extends: default | ||
rules: | ||
new-lines: | ||
level: warning | ||
type: unix | ||
line-length: | ||
max: 500 | ||
comments: | ||
min-spaces-from-content: 1 # Used to follow prettier standard: https://github.com/prettier/prettier/pull/10926 |