diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 0949152..7199c6a 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -20,6 +20,11 @@ on: required: false type: string default: 'VERBOSE' + validate-all-codebase: + description: 'Whether to run validation on all files' + required: false + type: boolean + default: true env: CSS_FILE_NAME: /.stylelintrc.json @@ -38,7 +43,7 @@ env: MARKDOWN_CONFIG_FILE: /.markdownlint.yaml NODE_VERSION: 18 TERRAFORM_TERRASCAN_CONFIG_FILE: /.utils/.github/linters/terrascan.yaml - VALIDATE_ALL_CODEBASE: true + VALIDATE_ALL_CODEBASE: ${{ inputs.validate-all-codebase }} VALIDATE_ANSIBLE: false VALIDATE_ARM: false # VALIDATE_BASH: true diff --git a/docs/LINTING.md b/docs/LINTING.md index ee2ba73..9bf563a 100644 --- a/docs/LINTING.md +++ b/docs/LINTING.md @@ -30,14 +30,17 @@ jobs: with: install-all: true generate-keys: true + validate-all-codebase: true ``` This uses the re-usable GitHub Actions workflow and calls the template from `node-utils` using the provided input variables: -- `install-all` - If `true` it will use `yarn install:all` instead of `yarn install` to trigger a custom script. +- `install-all` - If `true` it will use `yarn install:all` instead of `yarn install` to trigger a custom script. This is useful, if the repository has multiple sub-folders that all need to be installed - `generate-keys` - If `true` will call `yarn keys:generate` to run a custom script for dummy key creation. - `log-level` - One of the follorwing: `ERROR`, `WARN`, `NOTICE`, `VERBOSE`, `DEBUG` or `TRACE`; defaults to `VERBOSE`. +- `validate-all-codebase` - Corresponds to `VALIDATE_ALL_CODEBASE` for `super-linter`: + _When set to `false`, only new or edited files will be parsed for validation._ ## Configuration