From 8f7b2bcc749d629a76299d11c5da19eb397cf4aa Mon Sep 17 00:00:00 2001 From: Casey Vega Date: Mon, 6 Jul 2020 21:42:29 -0700 Subject: [PATCH] add suggested changes from @devoncarew - use analysis_options.yaml file (dart convention), mv .dart-lint.yml - add --fatal-infos switch for testing - add VALIDATE_DART, because I missed it before --- .github/linters/{.dart-lint.yml => analysis_options.yaml} | 0 lib/linter.sh | 2 +- lib/validation.sh | 1 + lib/worker.sh | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) rename .github/linters/{.dart-lint.yml => analysis_options.yaml} (100%) diff --git a/.github/linters/.dart-lint.yml b/.github/linters/analysis_options.yaml similarity index 100% rename from .github/linters/.dart-lint.yml rename to .github/linters/analysis_options.yaml diff --git a/lib/linter.sh b/lib/linter.sh index a86fcec3..52f45332 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -81,7 +81,7 @@ PROTOBUF_LINTER_RULES="$DEFAULT_RULES_LOCATION/$PROTOBUF_FILE_NAME" # Path t CLOJURE_FILE_NAME='.clj-kondo/config.edn' # Name of the file CLOJURE_LINTER_RULES="$DEFAULT_RULES_LOCATION/$CLOJURE_FILE_NAME" # Path to the Clojure lint rules # Dart Vars -DART_FILE_NAME='.dart-lint.yml' # Name of the file +DART_FILE_NAME='analysis_options.yaml' # Name of the file DART_LINTER_RULES="$DEFAULT_RULES_LOCATION/$DART_FILE_NAME" # Path to the DART lint rules # HTML Vars HTML_FILE_NAME='.htmlhintrc' # Name of the file diff --git a/lib/validation.sh b/lib/validation.sh index 707836dc..bc4f2682 100755 --- a/lib/validation.sh +++ b/lib/validation.sh @@ -73,6 +73,7 @@ function GetValidationInfo() { VALIDATE_PROTOBUF=$(echo "$VALIDATE_PROTOBUF" | awk '{print tolower($0)}') VALIDATE_OPENAPI=$(echo "$VALIDATE_OPENAPI" | awk '{print tolower($0)}') VALIDATE_EDITORCONFIG=$(echo "$VALIDATE_EDITORCONFIG" | awk '{print tolower($0)}') + VALIDATE_DART=$(echo "$VALIDATE_DART" | awk '{print tolower($0)}') VALIDATE_HTML=$(echo "$VALIDATE_HTML" | awk '{print tolower($0)}') ################################################ diff --git a/lib/worker.sh b/lib/worker.sh index 3240dca1..48a7a9a9 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -478,7 +478,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 --options $DART_LINTER_RULES" ".*\.\(dart\)\$" "dart" + TestCodebase "DART" "dart" "dartanalyzer --fatal-infos --options $DART_LINTER_RULES" ".*\.\(dart\)\$" "dart" TestCodebase "HTML" "htmlhint" "htmlhint --config $HTML_LINTER_RULES" ".*\.\(html\)\$" "html" #################