Skip to content

Commit

Permalink
feat: add validate-all-codebase option
Browse files Browse the repository at this point in the history
  • Loading branch information
frytg committed Aug 9, 2022
1 parent 0e9db76 commit 9b33ad0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion docs/LINTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9b33ad0

Please sign in to comment.