mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-22 08:41:02 -05:00
remove space
This commit is contained in:
parent
33f020ae4d
commit
f88db68011
2 changed files with 32 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
# Globals #
|
||||
###########
|
||||
GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # GitHub Workspace
|
||||
GITHUB_SHA="${GITHUB_SHA}" # Sha used to create this branch
|
||||
TEST_FOLDER='.automation/test' # Folder where test are stored
|
||||
CLEAN_FOLDER='.automation/automation' # Folder to rename to prevent skip
|
||||
|
||||
|
@ -142,6 +143,31 @@ CleanTestDockerFiles() {
|
|||
done
|
||||
}
|
||||
################################################################################
|
||||
#### Function CleanSHAFolder ###################################################
|
||||
CleanSHAFolder() {
|
||||
info "-------------------------------------------------------"
|
||||
info "Cleaning folder named:[${GITHUB_SHA}] if it exists"
|
||||
|
||||
##################
|
||||
# Find the files #
|
||||
##################
|
||||
REMOVE_CMD=$(cd "${GITHUB_WORKSPACE}" || exit 1; rm -rf "${GITHUB_SHA}" 2>&1)
|
||||
|
||||
#######################
|
||||
# Load the error code #
|
||||
#######################
|
||||
ERROR_CODE=$?
|
||||
|
||||
##############################
|
||||
# Check the shell for errors #
|
||||
##############################
|
||||
if [ $ERROR_CODE -ne 0 ]; then
|
||||
# Error
|
||||
error "ERROR! Failed to remove folder:[${GITHUB_SHA}]!"
|
||||
fatal "ERROR:[${REMOVE_CMD}]"
|
||||
fi
|
||||
}
|
||||
################################################################################
|
||||
#### Function RenameTestFolder #################################################
|
||||
RenameTestFolder() {
|
||||
info "-------------------------------------------------------"
|
||||
|
@ -184,6 +210,11 @@ CleanTestFiles
|
|||
###############################
|
||||
CleanTestDockerFiles
|
||||
|
||||
###############################
|
||||
# Remove sha folder if exists #
|
||||
###############################
|
||||
CleanSHAFolder
|
||||
|
||||
##################
|
||||
# Re Name folder #
|
||||
##################
|
||||
|
|
|
@ -604,7 +604,7 @@ function RunTestCases() {
|
|||
TestCodebase "RUBY" "rubocop" "rubocop -c ${RUBY_LINTER_RULES}" ".*\.\(rb\)\$" "ruby"
|
||||
TestCodebase "STATES" "asl-validator" "asl-validator --json-path" ".*\.\(json\)\$" "states"
|
||||
TestCodebase "TERRAFORM" "tflint" "tflint -c ${TERRAFORM_LINTER_RULES}" ".*\.\(tf\)\$" "terraform"
|
||||
TestCodebase "TERRAFORM_TERRASCAN" "terrascan" "terrascan -f " ".*\.\(tf\)\$" "terraform_terrascan"
|
||||
TestCodebase "TERRAFORM_TERRASCAN" "terrascan" "terrascan -f" ".*\.\(tf\)\$" "terraform_terrascan"
|
||||
TestCodebase "TYPESCRIPT_ES" "eslint" "eslint --no-eslintrc -c ${TYPESCRIPT_LINTER_RULES}" ".*\.\(ts\)\$" "typescript"
|
||||
TestCodebase "TYPESCRIPT_STANDARD" "standard" "standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin ${TYPESCRIPT_STANDARD_LINTER_RULES}" ".*\.\(ts\)\$" "typescript"
|
||||
TestCodebase "XML" "xmllint" "xmllint" ".*\.\(xml\)\$" "xml"
|
||||
|
|
Loading…
Reference in a new issue