mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-26 08:01:03 -05:00
add dart pub get and --fatal flags
- add `pub get || true` - add --fatal flags to throw 1 on exit Adding `pub get` enables dart to import dev/project dependencies before analysis/linting. It is set to always return true in the event this has already occured somewhere else in the CI workflow a pubspec.yaml does not exist Using `--fatal-(infos|warnings)` allows super-linter to fail when a lint is reported.
This commit is contained in:
parent
abf0bdbf66
commit
95f0c2d534
2 changed files with 2 additions and 2 deletions
|
@ -1185,7 +1185,7 @@ if [ "$VALIDATE_DART" == "true" ]; then
|
|||
# Lint the Dart files #
|
||||
#######################
|
||||
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY"
|
||||
LintCodebase "DART" "dart" "dartanalyzer --options $DART_LINTER_RULES" ".*\.\(dart\)\$" "${FILE_ARRAY_DART[@]}"
|
||||
LintCodebase "DART" "dart" "pub get || true && dartanalyzer --fatal-infos --fatal-warnings --options $DART_LINTER_RULES" ".*\.\(dart\)\$" "${FILE_ARRAY_DART[@]}"
|
||||
fi
|
||||
|
||||
##################
|
||||
|
|
|
@ -479,7 +479,7 @@ function RunTestCases() {
|
|||
TestCodebase "KOTLIN" "ktlint" "ktlint" ".*\.\(kt\|kts\)\$" "kotlin"
|
||||
TestCodebase "PROTOBUF" "protolint" "protolint lint --config_path $PROTOBUF_LINTER_RULES" ".*\.\(proto\)\$" "protobuf"
|
||||
TestCodebase "OPENAPI" "spectral" "spectral lint -r $OPENAPI_LINTER_RULES" ".*\.\(ymlopenapi\|jsonopenapi\)\$" "openapi"
|
||||
TestCodebase "DART" "dart" "dartanalyzer --fatal-infos --options $DART_LINTER_RULES" ".*\.\(dart\)\$" "dart"
|
||||
TestCodebase "DART" "dart" "dartanalyzer --fatal-infos --fatal-warnings --options $DART_LINTER_RULES" ".*\.\(dart\)\$" "dart"
|
||||
TestCodebase "HTML" "htmlhint" "htmlhint --config $HTML_LINTER_RULES" ".*\.\(html\)\$" "html"
|
||||
|
||||
#################
|
||||
|
|
Loading…
Reference in a new issue