diff --git a/.mega-linter.yml b/.github/linters/.mega-linter.yml similarity index 97% rename from .mega-linter.yml rename to .github/linters/.mega-linter.yml index b1995fc7c7..dad548e605 100644 --- a/.mega-linter.yml +++ b/.github/linters/.mega-linter.yml @@ -11,7 +11,6 @@ ENABLE: - YAML ENABLE_LINTERS: - JSON_PRETTIER - #- REPOSITORY_GITLEAKS - DOCKERFILE_HADOLINT - XML_XMLLINT - YAML_PRETTIER diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index ad5c26de16..fe4670675a 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -26,5 +26,6 @@ jobs: env: LOG_LEVEL: NOTICE GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + EXTENDS: .github/linters/.mega-linter.yml # setting this to false means that only changed files will be scanned in each commit VALIDATE_ALL_CODEBASE: ${{ github.event_name != 'pull_request' }} diff --git a/DEVELOPING.md b/DEVELOPING.md index 3d1d139c33..cc8eba0b3f 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -300,8 +300,8 @@ Instructions are derived from [MegaLinter Runner Documentation](https://megalint 1) Install [Node Package Manager (NPM)](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) 2) Install mega-linter-runner for current users `npm install mega-linter-runner --save-dev` -3) Run MegaLinter from project root using project configuration `mega-linter-runner .mega-linter.yml .` -* To have MegaLinter attempt to fix errors add the `--fix` option to the command: `mega-linter-runner .mega-linter.yml --fix .` +3) Run MegaLinter from project root using project configuration `mega-linter-runner -e 'LINTER_RULES_PATH=.github/linters' .` +* To have MegaLinter attempt to fix errors add the `--fix` option to the command: `mega-linter-runner -e 'LINTER_RULES_PATH=.github/linters' --fix . ` ## Helpful Commands