mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-24 23:21:12 -05:00
commit
54ae156900
7 changed files with 85 additions and 8 deletions
10
.devcontainer/README.md
Normal file
10
.devcontainer/README.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Devcontainer
|
||||
This file specifies to vscode how to run the container
|
||||
|
||||
For format details, see [documentation](https://aka.ms/vscode-remote/devcontainer.json) or this file's [README](https://github.com/microsoft/vscode-dev-containers/tree/v0.123.0/containers/docker-existing-dockerfile)
|
||||
|
||||
|
||||
context: Sets the run context to one level up instead of the .devcontainer folder.
|
||||
dockerFile: Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
|
||||
settings: Set *default* container specific settings.json values on container create.
|
||||
extensions: Add the IDs of extensions you want installed when the container is created.
|
12
.devcontainer/devcontainer.json
Normal file
12
.devcontainer/devcontainer.json
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "SUPER-LINTER",
|
||||
"context": "..",
|
||||
"dockerFile": "..//Dockerfile",
|
||||
"settings": {
|
||||
"terminal.integrated.shell.linux": "/bin/bash"
|
||||
},
|
||||
"extensions": [
|
||||
"github.vscode-pull-request-github",
|
||||
"rogalmic.bash-debug"
|
||||
]
|
||||
}
|
3
.gitattributes
vendored
Normal file
3
.gitattributes
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
* text=auto eol=lf
|
||||
*.{cmd,[cC][mM][dD]} text eol=crlf
|
||||
*.{bat,[bB][aA][tT]} text eol=crlf
|
16
.vscode/launch.json
vendored
Normal file
16
.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "bashdb",
|
||||
"request": "launch",
|
||||
"name": "Test Linter",
|
||||
"program": ".vscode/testlinter.sh",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"internalConsoleOptions": "openOnSessionStart",
|
||||
"presentation": {
|
||||
"group": "aLinter"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
26
.vscode/testlinter.sh
vendored
Normal file
26
.vscode/testlinter.sh
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# At this point you can use the debug console to add export GITHUB_WORKSPACE=/path to test only a specific folder
|
||||
# You can also use ln -s /path /tmp/lint as an alternative
|
||||
# If you do neither, this will default to running against the test automation files
|
||||
|
||||
###########
|
||||
# GLOBALS #
|
||||
###########
|
||||
CODE_PATH='/tmp/lint' # Path to code base
|
||||
|
||||
##################
|
||||
# Check the path #
|
||||
##################
|
||||
if [ ! -L $CODE_PATH ]; then
|
||||
# Create symbolic link
|
||||
ln -s "$PWD"/.automation/test $CODE_PATH
|
||||
fi
|
||||
|
||||
#########################
|
||||
# Export to run locally #
|
||||
#########################
|
||||
export RUN_LOCAL=true
|
||||
|
||||
# shellcheck disable=SC1091,SC1090
|
||||
source "$PWD"/lib/linter.sh
|
|
@ -208,6 +208,12 @@ Below are a list of the known limitations for the **GitHub Super-Linter**:
|
|||
## How to contribute
|
||||
If you would like to help contribute to this **GitHub** Action, please see [CONTRIBUTING](https://github.com/github/super-linter/blob/master/.github/CONTRIBUTING.md)
|
||||
|
||||
### Visual Studio Code
|
||||
You can checkout this repository using [Container Remote Development](https://code.visualstudio.com/docs/remote/containers), and debug the linter using the `Test Linter` task.
|
||||
![Example](https://user-images.githubusercontent.com/15258962/85165778-2d2ce700-b21b-11ea-803e-3f6709d8e609.gif)
|
||||
|
||||
We will also support [Github Codespaces](https://github.com/features/codespaces/) once it becomes available
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
### License
|
||||
|
|
|
@ -659,6 +659,14 @@ GetGitHubVars()
|
|||
##########################################
|
||||
echo "NOTE: ENV VAR [RUN_LOCAL] has been set to:[true]"
|
||||
echo "bypassing GitHub Actions variables..."
|
||||
|
||||
############################
|
||||
# Set the GITHUB_WORKSPACE #
|
||||
############################
|
||||
if [ -z "$GITHUB_WORKSPACE" ]; then
|
||||
GITHUB_WORKSPACE="$DEFAULT_WORKSPACE"
|
||||
fi
|
||||
|
||||
echo "Linting all files in mapped directory:[$DEFAULT_WORKSPACE]"
|
||||
|
||||
# No need to touch or set the GITHUB_SHA
|
||||
|
@ -666,10 +674,6 @@ GetGitHubVars()
|
|||
# No need to touch or set the GITHUB_ORG
|
||||
# No need to touch or set the GITHUB_REPO
|
||||
|
||||
############################
|
||||
# Set the GITHUB_WORKSPACE #
|
||||
############################
|
||||
GITHUB_WORKSPACE="$DEFAULT_WORKSPACE"
|
||||
|
||||
#################################
|
||||
# Set the VALIDATE_ALL_CODEBASE #
|
||||
|
|
Loading…
Reference in a new issue