fixing internal names

This commit is contained in:
Lucas Gravley 2020-07-21 08:52:30 -05:00
parent dabf5e25c0
commit 535d2aea7d
4 changed files with 19 additions and 19 deletions

View file

@ -183,7 +183,7 @@ function BuildFileList() {
################################ ################################
# Append the file to the array # # Append the file to the array #
################################ ################################
FILE_ARRAY_MD+=("$FILE") FILE_ARRAY_MARKDOWN+=("$FILE")
###################### ######################
# Get the BASH files # # Get the BASH files #
###################### ######################

View file

@ -28,8 +28,8 @@ LINTER_RULES_PATH="${LINTER_RULES_PATH:-.github/linters}" # Linter
YAML_FILE_NAME='.yaml-lint.yml' # Name of the file YAML_FILE_NAME='.yaml-lint.yml' # Name of the file
YAML_LINTER_RULES="$DEFAULT_RULES_LOCATION/$YAML_FILE_NAME" # Path to the yaml lint rules YAML_LINTER_RULES="$DEFAULT_RULES_LOCATION/$YAML_FILE_NAME" # Path to the yaml lint rules
# MD Vars # MD Vars
MD_FILE_NAME='.markdown-lint.yml' # Name of the file MARKDOWN_FILE_NAME='.markdown-lint.yml' # Name of the file
MD_LINTER_RULES="$DEFAULT_RULES_LOCATION/$MD_FILE_NAME" # Path to the markdown lint rules MARKDOWN_LINTER_RULES="$DEFAULT_RULES_LOCATION/$MARKDOWN_FILE_NAME" # Path to the markdown lint rules
# Python Vars # Python Vars
PYTHON_FILE_NAME='.python-lint' # Name of the file PYTHON_FILE_NAME='.python-lint' # Name of the file
PYTHON_LINTER_RULES="$DEFAULT_RULES_LOCATION/$PYTHON_FILE_NAME" # Path to the python lint rules PYTHON_LINTER_RULES="$DEFAULT_RULES_LOCATION/$PYTHON_FILE_NAME" # Path to the python lint rules
@ -126,7 +126,7 @@ VALIDATE_ALL_CODEBASE="${VALIDATE_ALL_CODEBASE}" # Boolean to vali
VALIDATE_ANSIBLE="${VALIDATE_ANSIBLE}" # Boolean to validate language VALIDATE_ANSIBLE="${VALIDATE_ANSIBLE}" # Boolean to validate language
VALIDATE_ARM="${VALIDATE_ARM}" # Boolean to validate language VALIDATE_ARM="${VALIDATE_ARM}" # Boolean to validate language
VALIDATE_BASH="${VALIDATE_BASH}" # Boolean to validate language VALIDATE_BASH="${VALIDATE_BASH}" # Boolean to validate language
VALIDATE_CLOUDFORMATION="${VALIDATE_CLOUDFORMATION}" # Boolean to validate language VALIDATE_CFN="${VALIDATE_CLOUDFORMATION}" # Boolean to validate language
VALIDATE_CLOJURE="${VALIDATE_CLOJURE}" # Boolean to validate language VALIDATE_CLOJURE="${VALIDATE_CLOJURE}" # Boolean to validate language
VALIDATE_COFFEE="${VALIDATE_COFFEE}" # Boolean to validate language VALIDATE_COFFEE="${VALIDATE_COFFEE}" # Boolean to validate language
VALIDATE_CSS="${VALIDATE_CSS}" # Boolean to validate language VALIDATE_CSS="${VALIDATE_CSS}" # Boolean to validate language
@ -141,7 +141,7 @@ VALIDATE_JAVASCRIPT_STANDARD="${VALIDATE_JAVASCRIPT_STANDARD}" # Boolean to vali
VALIDATE_JSON="${VALIDATE_JSON}" # Boolean to validate language VALIDATE_JSON="${VALIDATE_JSON}" # Boolean to validate language
VALIDATE_JSX="${VALIDATE_JSX}" # Boolean to validate language VALIDATE_JSX="${VALIDATE_JSX}" # Boolean to validate language
VALIDATE_KOTLIN="${VALIDATE_KOTLIN}" # Boolean to validate language VALIDATE_KOTLIN="${VALIDATE_KOTLIN}" # Boolean to validate language
VALIDATE_MD="${VALIDATE_MD}" # Boolean to validate language VALIDATE_MARKDOWN="${VALIDATE_MD}" # Boolean to validate language
VALIDATE_OPENAPI="${VALIDATE_OPENAPI}" # Boolean to validate language VALIDATE_OPENAPI="${VALIDATE_OPENAPI}" # Boolean to validate language
VALIDATE_PERL="${VALIDATE_PERL}" # Boolean to validate language VALIDATE_PERL="${VALIDATE_PERL}" # Boolean to validate language
VALIDATE_PHP="${VALIDATE_PHP}" # Boolean to validate language VALIDATE_PHP="${VALIDATE_PHP}" # Boolean to validate language
@ -216,7 +216,7 @@ FILE_ARRAY_JAVASCRIPT_STANDARD=() # Array of files to check
FILE_ARRAY_JSON=() # Array of files to check FILE_ARRAY_JSON=() # Array of files to check
FILE_ARRAY_JSX=() # Array of files to check FILE_ARRAY_JSX=() # Array of files to check
FILE_ARRAY_KOTLIN=() # Array of files to check FILE_ARRAY_KOTLIN=() # Array of files to check
FILE_ARRAY_MD=() # Array of files to check FILE_ARRAY_MARKDOWN=() # Array of files to check
FILE_ARRAY_OPENAPI=() # Array of files to check FILE_ARRAY_OPENAPI=() # Array of files to check
FILE_ARRAY_PERL=() # Array of files to check FILE_ARRAY_PERL=() # Array of files to check
FILE_ARRAY_PHP=() # Array of files to check FILE_ARRAY_PHP=() # Array of files to check
@ -1012,7 +1012,7 @@ GetValidationInfo
# Get YML rules # Get YML rules
GetLinterRules "YAML" GetLinterRules "YAML"
# Get Markdown rules # Get Markdown rules
GetLinterRules "MD" GetLinterRules "MARKDOWN"
# Get Python rules # Get Python rules
GetLinterRules "PYTHON" GetLinterRules "PYTHON"
# Get Ruby rules # Get Ruby rules
@ -1117,12 +1117,12 @@ fi
#################### ####################
# MARKDOWN LINTING # # MARKDOWN LINTING #
#################### ####################
if [ "$VALIDATE_MD" == "true" ]; then if [ "$VALIDATE_MARKDOWN" == "true" ]; then
########################### ###########################
# Lint the Markdown Files # # Lint the Markdown Files #
########################### ###########################
# LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY"
LintCodebase "MARKDOWN" "markdownlint" "markdownlint -c $MD_LINTER_RULES" ".*\.\(md\)\$" "${FILE_ARRAY_MD[@]}" LintCodebase "MARKDOWN" "markdownlint" "markdownlint -c $MARKDOWN_LINTER_RULES" ".*\.\(md\)\$" "${FILE_ARRAY_MARKDOWN[@]}"
fi fi
################ ################
@ -1150,7 +1150,7 @@ fi
############### ###############
# CFN LINTING # # CFN LINTING #
############### ###############
if [ "$VALIDATE_CLOUDFORMATION" == "true" ]; then if [ "$VALIDATE_CFN" == "true" ]; then
################################# #################################
# Lint the CloudFormation files # # Lint the CloudFormation files #
################################# #################################

View file

@ -63,7 +63,7 @@ function GetValidationInfo() {
VALIDATE_JSON=$(echo "$VALIDATE_JSON" | awk '{print tolower($0)}') VALIDATE_JSON=$(echo "$VALIDATE_JSON" | awk '{print tolower($0)}')
VALIDATE_JSX=$(echo "$VALIDATE_JSX" | awk '{print tolower($0)}') VALIDATE_JSX=$(echo "$VALIDATE_JSX" | awk '{print tolower($0)}')
VALIDATE_KOTLIN=$(echo "$VALIDATE_KOTLIN" | awk '{print tolower($0)}') VALIDATE_KOTLIN=$(echo "$VALIDATE_KOTLIN" | awk '{print tolower($0)}')
VALIDATE_MD=$(echo "$VALIDATE_MD" | awk '{print tolower($0)}') VALIDATE_MARKDOWN=$(echo "$VALIDATE_MARKDOWN" | awk '{print tolower($0)}')
VALIDATE_OPENAPI=$(echo "$VALIDATE_OPENAPI" | awk '{print tolower($0)}') VALIDATE_OPENAPI=$(echo "$VALIDATE_OPENAPI" | awk '{print tolower($0)}')
VALIDATE_PERL=$(echo "$VALIDATE_PERL" | awk '{print tolower($0)}') VALIDATE_PERL=$(echo "$VALIDATE_PERL" | awk '{print tolower($0)}')
VALIDATE_PHP=$(echo "$VALIDATE_PHP" | awk '{print tolower($0)}') VALIDATE_PHP=$(echo "$VALIDATE_PHP" | awk '{print tolower($0)}')
@ -86,7 +86,7 @@ function GetValidationInfo() {
if [[ -n $VALIDATE_YAML || -n \ if [[ -n $VALIDATE_YAML || -n \
$VALIDATE_JSON || -n \ $VALIDATE_JSON || -n \
$VALIDATE_XML || -n \ $VALIDATE_XML || -n \
$VALIDATE_MD || -n \ $VALIDATE_MARKDOWN || -n \
$VALIDATE_BASH || -n \ $VALIDATE_BASH || -n \
$VALIDATE_PERL || -n \ $VALIDATE_PERL || -n \
$VALIDATE_RAKU || -n \ $VALIDATE_RAKU || -n \
@ -163,13 +163,13 @@ function GetValidationInfo() {
######################################## ########################################
if [[ $ANY_SET == "true" ]]; then if [[ $ANY_SET == "true" ]]; then
# Some linter flags were set - only run those set to true # Some linter flags were set - only run those set to true
if [[ -z $VALIDATE_MD ]]; then if [[ -z $VALIDATE_MARKDOWN ]]; then
# MD flag was not set - default to false # MD flag was not set - default to false
VALIDATE_MD="false" VALIDATE_MARKDOWN="false"
fi fi
else else
# No linter flags were set - default all to true # No linter flags were set - default all to true
VALIDATE_MD="true" VALIDATE_MARKDOWN="true"
fi fi
#################################### ####################################
@ -585,7 +585,7 @@ function GetValidationInfo() {
else else
PRINT_ARRAY+=("- Excluding [XML] files in code base...") PRINT_ARRAY+=("- Excluding [XML] files in code base...")
fi fi
if [[ $VALIDATE_MD == "true" ]]; then if [[ $VALIDATE_MARKDOWN == "true" ]]; then
PRINT_ARRAY+=("- Validating [MARKDOWN] files in code base...") PRINT_ARRAY+=("- Validating [MARKDOWN] files in code base...")
else else
PRINT_ARRAY+=("- Excluding [MARKDOWN] files in code base...") PRINT_ARRAY+=("- Excluding [MARKDOWN] files in code base...")

View file

@ -1,4 +1,4 @@
#!/usr/bin/env bash MARKDOWN_#!/usr/bin/env bash
################################################################################ ################################################################################
################################################################################ ################################################################################
@ -569,7 +569,7 @@ function RunTestCases() {
TestCodebase "JAVASCRIPT_STANDARD" "standard" "standard $JAVASCRIPT_STANDARD_LINTER_RULES" ".*\.\(js\)\$" "javascript" TestCodebase "JAVASCRIPT_STANDARD" "standard" "standard $JAVASCRIPT_STANDARD_LINTER_RULES" ".*\.\(js\)\$" "javascript"
TestCodebase "JSON" "jsonlint" "jsonlint" ".*\.\(json\)\$" "json" TestCodebase "JSON" "jsonlint" "jsonlint" ".*\.\(json\)\$" "json"
TestCodebase "KOTLIN" "ktlint" "ktlint" ".*\.\(kt\|kts\)\$" "kotlin" TestCodebase "KOTLIN" "ktlint" "ktlint" ".*\.\(kt\|kts\)\$" "kotlin"
TestCodebase "MARKDOWN" "markdownlint" "markdownlint -c $MD_LINTER_RULES" ".*\.\(md\)\$" "markdown" TestCodebase "MARKDOWN" "markdownlint" "markdownlint -c $MARKDOWN_LINTER_RULES" ".*\.\(md\)\$" "markdown"
TestCodebase "PERL" "perl" "perl -Mstrict -cw" ".*\.\(pl\)\$" "perl" TestCodebase "PERL" "perl" "perl -Mstrict -cw" ".*\.\(pl\)\$" "perl"
TestCodebase "PHP" "php" "php -l" ".*\.\(php\)\$" "php" TestCodebase "PHP" "php" "php -l" ".*\.\(php\)\$" "php"
TestCodebase "OPENAPI" "spectral" "spectral lint -r $OPENAPI_LINTER_RULES" ".*\.\(ymlopenapi\|jsonopenapi\)\$" "openapi" TestCodebase "OPENAPI" "spectral" "spectral lint -r $OPENAPI_LINTER_RULES" ".*\.\(ymlopenapi\|jsonopenapi\)\$" "openapi"