mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-22 14:10:56 -05:00
Merge branch 'ClojureLint' of https://github.com/github/super-linter into ClojureLint
This commit is contained in:
commit
82af32982d
4 changed files with 11 additions and 9 deletions
2
.github/workflows/cleanup-DEV.yml
vendored
2
.github/workflows/cleanup-DEV.yml
vendored
|
@ -47,7 +47,7 @@ jobs:
|
||||||
# Set the Env Vars
|
# Set the Env Vars
|
||||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
IMAGE_REPO: admiralawkbar/super-linter
|
IMAGE_REPO: github/super-linter
|
||||||
IMAGE_VERSION: ${{ github.event.pull_request.head.ref }}
|
IMAGE_VERSION: ${{ github.event.pull_request.head.ref }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: .automation/cleanup-docker.sh
|
run: .automation/cleanup-docker.sh
|
||||||
|
|
|
@ -154,6 +154,7 @@ ENV GITHUB_SHA=${GITHUB_SHA} \
|
||||||
GITHUB_WORKSPACE=${GITHUB_WORKSPACE} \
|
GITHUB_WORKSPACE=${GITHUB_WORKSPACE} \
|
||||||
DEFAULT_BRANCH=${DEFAULT_BRANCH} \
|
DEFAULT_BRANCH=${DEFAULT_BRANCH} \
|
||||||
VALIDATE_ALL_CODEBASE=${VALIDATE_ALL_CODEBASE} \
|
VALIDATE_ALL_CODEBASE=${VALIDATE_ALL_CODEBASE} \
|
||||||
|
LINTER_RULES_PATH=${LINTER_RULES_PATH} \
|
||||||
VALIDATE_YAML=${VALIDATE_YAML} \
|
VALIDATE_YAML=${VALIDATE_YAML} \
|
||||||
VALIDATE_JSON=${VALIDATE_JSON} \
|
VALIDATE_JSON=${VALIDATE_JSON} \
|
||||||
VALIDATE_XML=${VALIDATE_XML} \
|
VALIDATE_XML=${VALIDATE_XML} \
|
||||||
|
|
|
@ -99,14 +99,14 @@ jobs:
|
||||||
# Run Linter against code base #
|
# Run Linter against code base #
|
||||||
################################
|
################################
|
||||||
- name: Lint Code Base
|
- name: Lint Code Base
|
||||||
uses: docker://github/super-linter:v2.1.0
|
uses: docker://github/super-linter:v2.2.0
|
||||||
env:
|
env:
|
||||||
VALIDATE_ALL_CODEBASE: false
|
VALIDATE_ALL_CODEBASE: false
|
||||||
VALIDATE_ANSIBLE: false
|
VALIDATE_ANSIBLE: false
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
**NOTE:** Using the line:`uses: docker://github/super-linter:v2.1.0` will pull the image down from **DockerHub** and run the **GitHub Super-Linter**. Using the line: `uses: github/super-linter@v2.1.0` will build and compile the **GitHub Super-Linter** at build time. This can be far more costly in time...
|
**NOTE:** Using the line:`uses: docker://github/super-linter:v2.2.0` will pull the image down from **DockerHub** and run the **GitHub Super-Linter**. Using the line: `uses: github/super-linter@v2.2.0` will build and compile the **GitHub Super-Linter** at build time. This can be far more costly in time...
|
||||||
|
|
||||||
## Environment variables
|
## Environment variables
|
||||||
The super-linter allows you to pass the following `ENV` variables to be able to trigger different functionality.
|
The super-linter allows you to pass the following `ENV` variables to be able to trigger different functionality.
|
||||||
|
@ -122,6 +122,7 @@ and won't run anything unexpected.
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| **VALIDATE_ALL_CODEBASE** | `true` | Will parse the entire repository and find all files to validate across all types. **NOTE:** When set to `false`, only **new** or **edited** files will be parsed for validation. |
|
| **VALIDATE_ALL_CODEBASE** | `true` | Will parse the entire repository and find all files to validate across all types. **NOTE:** When set to `false`, only **new** or **edited** files will be parsed for validation. |
|
||||||
| **DEFAULT_BRANCH** | `master` | The name of the repository default branch. |
|
| **DEFAULT_BRANCH** | `master` | The name of the repository default branch. |
|
||||||
|
| **LINTER_RULES_PATH** | `.github/linters` | Directory for all linter configuration rules. |
|
||||||
| **VALIDATE_YAML** | `true` |Flag to enable or disable the linting process of the language. |
|
| **VALIDATE_YAML** | `true` |Flag to enable or disable the linting process of the language. |
|
||||||
| **VALIDATE_JSON** | `true` | Flag to enable or disable the linting process of the language. |
|
| **VALIDATE_JSON** | `true` | Flag to enable or disable the linting process of the language. |
|
||||||
| **VALIDATE_XML** | `true` | Flag to enable or disable the linting process of the language. |
|
| **VALIDATE_XML** | `true` | Flag to enable or disable the linting process of the language. |
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
###########
|
###########
|
||||||
# Default Vars
|
# Default Vars
|
||||||
DEFAULT_RULES_LOCATION='/action/lib/.automation' # Default rules files location
|
DEFAULT_RULES_LOCATION='/action/lib/.automation' # Default rules files location
|
||||||
LINTER_PATH='.github/linters' # Default linter path
|
LINTER_RULES_PATH="${LINTER_RULES_PATH:-.github/linters}" # Linter Path Directory
|
||||||
# YAML Vars
|
# YAML Vars
|
||||||
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
|
||||||
|
@ -101,11 +101,11 @@ VALIDATE_TYPESCRIPT_ES="${VALIDATE_TYPESCRIPT_ES}" # Boolean to val
|
||||||
VALIDATE_TYPESCRIPT_STANDARD="${VALIDATE_TYPESCRIPT_STANDARD}" # Boolean to validate language
|
VALIDATE_TYPESCRIPT_STANDARD="${VALIDATE_TYPESCRIPT_STANDARD}" # Boolean to validate language
|
||||||
VALIDATE_DOCKER="${VALIDATE_DOCKER}" # Boolean to validate language
|
VALIDATE_DOCKER="${VALIDATE_DOCKER}" # Boolean to validate language
|
||||||
VALIDATE_GO="${VALIDATE_GO}" # Boolean to validate language
|
VALIDATE_GO="${VALIDATE_GO}" # Boolean to validate language
|
||||||
VALIDATE_TERRAFORM="${VALIDATE_TERRAFORM}" # Boolean to validate language
|
|
||||||
VALIDATE_POWERSHELL="${VALIDATE_POWERSHELL}" # Boolean to validate language
|
|
||||||
VALIDATE_CSS="${VALIDATE_CSS}" # Boolean to validate language
|
VALIDATE_CSS="${VALIDATE_CSS}" # Boolean to validate language
|
||||||
VALIDATE_ENV="${VALIDATE_ENV}" # Boolean to validate language
|
VALIDATE_ENV="${VALIDATE_ENV}" # Boolean to validate language
|
||||||
VALIDATE_CLOJURE="${VALIDATE_CLOJURE}" # Boolean to validate language
|
VALIDATE_CLOJURE="${VALIDATE_CLOJURE}" # Boolean to validate language
|
||||||
|
VALIDATE_TERRAFORM="${VALIDATE_TERRAFORM}" # Boolean to validate language
|
||||||
|
VALIDATE_POWERSHELL="${VALIDATE_POWERSHELL}" # Boolean to validate language
|
||||||
VALIDATE_KOTLIN="${VALIDATE_KOTLIN}" # Boolean to validate language
|
VALIDATE_KOTLIN="${VALIDATE_KOTLIN}" # Boolean to validate language
|
||||||
TEST_CASE_RUN="${TEST_CASE_RUN}" # Boolean to validate only test cases
|
TEST_CASE_RUN="${TEST_CASE_RUN}" # Boolean to validate only test cases
|
||||||
DISABLE_ERRORS="${DISABLE_ERRORS}" # Boolean to enable warning-only output without throwing errors
|
DISABLE_ERRORS="${DISABLE_ERRORS}" # Boolean to enable warning-only output without throwing errors
|
||||||
|
@ -269,14 +269,14 @@ GetLinterRules()
|
||||||
#####################################
|
#####################################
|
||||||
# Validate we have the linter rules #
|
# Validate we have the linter rules #
|
||||||
#####################################
|
#####################################
|
||||||
if [ -f "$GITHUB_WORKSPACE/$LINTER_PATH/$FILE_NAME" ]; then
|
if [ -f "$GITHUB_WORKSPACE/$LINTER_RULES_PATH/$FILE_NAME" ]; then
|
||||||
echo "----------------------------------------------"
|
echo "----------------------------------------------"
|
||||||
echo "User provided file:[$FILE_NAME], setting rules file..."
|
echo "User provided file:[$FILE_NAME], setting rules file..."
|
||||||
|
|
||||||
####################################
|
####################################
|
||||||
# Copy users into default location #
|
# Copy users into default location #
|
||||||
####################################
|
####################################
|
||||||
CP_CMD=$(cp "$GITHUB_WORKSPACE/$LINTER_PATH/$FILE_NAME" "$FILE_LOCATION" 2>&1)
|
CP_CMD=$(cp "$GITHUB_WORKSPACE/$LINTER_RULES_PATH/$FILE_NAME" "$FILE_LOCATION" 2>&1)
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# Load Error code #
|
# Load Error code #
|
||||||
|
@ -296,7 +296,7 @@ GetLinterRules()
|
||||||
# No user default provided, using the template default #
|
# No user default provided, using the template default #
|
||||||
########################################################
|
########################################################
|
||||||
if [[ "$ACTIONS_RUNNER_DEBUG" == "true" ]]; then
|
if [[ "$ACTIONS_RUNNER_DEBUG" == "true" ]]; then
|
||||||
echo " -> Codebase does NOT have file:[$LINTER_PATH/$FILE_NAME], using Default rules at:[$FILE_LOCATION]"
|
echo " -> Codebase does NOT have file:[$LINTER_RULES_PATH/$FILE_NAME], using Default rules at:[$FILE_LOCATION]"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue