Skip to content

Commit

Permalink
README & dev container
Browse files Browse the repository at this point in the history
  • Loading branch information
nvuillam committed Oct 23, 2020
1 parent 0537b38 commit 9478e8b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .vscode/testlinter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fi
#########################
# Export to run locally #
#########################
export RUN_LOCAL=true
export TEST_CASE_RUN=true

# shellcheck source=/dev/null
source "${PWD}"/lib/linter.sh
source "${PWD}"/entrypoint.sh
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,30 @@ Check out the [note](#how-it-works) in **How it Works** to understand more about

### Azure

Check out this [article](https://blog.tyang.org/2020/06/27/use-github-super-linter-in-azure-pipelines/)
Follow the same instructions, just replace super-linter by mega-linter
```yaml
- job: megalinter
displayName: Mega-Linter
pool:
vmImage: ubuntu-latest
steps:
- script: |
docker pull nvuillam/mega-linter:latest
docker run -v $(System.DefaultWorkingDirectory):/tmp/lint nvuillam/mega-linter
displayName: 'Code Scan using Mega-Linter'
```
### GitLab
Check out this [snippet](https://gitlab.com/snippets/1988376)
```yaml
megalinter:
stage: linting
image: nvuillam/mega-linter:v4
script: [ "true" ]
variables:
DEFAULT_WORKSPACE: $CI_BUILDS_DIR
ANSIBLE_DIRECTORY: $CI_PROJECT_PATH
LINTER_RULES_PATH: $CI_PROJECT_PATH/.github/linters
```
### Visual Studio Code
Expand All @@ -358,7 +376,7 @@ Below are a list of the known limitations for the **Mega-Linter**:

## How to contribute

If you would like to help contribute to this **GitHub** Action, please see [CONTRIBUTING](https://github.com/github/mega-linter/blob/master/.github/CONTRIBUTING.md)
If you would like to help contribute to this repository, please see [CONTRIBUTING](https://github.com/github/mega-linter/blob/master/.github/CONTRIBUTING.md)

---

Expand Down
6 changes: 3 additions & 3 deletions docs/run-linter-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You can follow the link below on how to install and configure **Docker** on your
## Download the latest Mega-Linter Docker container

- Pull the latest **Docker** container down from **DockerHub**
- `docker pull nvuillam/mega-linter:latest`
- `docker pull nvuillam/mega-linter:v4`
Once the container has been downloaded to your local environment, you can then begin the process, or running the container against your codebase.

## Run the container Locally
Expand All @@ -33,9 +33,9 @@ You can add as many **Additional** flags as needed, documented in [README.md](..

### Example

```bash
docker pull github/mega-linter:latest
```shell
git clone https://github.com/nvuillam/npm-groovy-lint.git
docker pull github/mega-linter:latest
docker run -e FILTER_REGEX_INCLUDE='(.*lib/.*)' -e FILTER_REGEX_EXCLUDE='(.*lib/example/.*)' -v ~/npm-groovy-lint:/tmp/lint nvuillam/mega-linter
```

Expand Down

0 comments on commit 9478e8b

Please sign in to comment.