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
This commit is contained in:
Casey Vega 2020-07-06 21:42:29 -07:00
parent 433b10bdc9
commit 8f7b2bcc74
No known key found for this signature in database
GPG key ID: 2E831CEB696E297C
4 changed files with 3 additions and 2 deletions

View file

@ -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

View file

@ -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)}')
################################################

View file

@ -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"
#################