Skip to content

Commit

Permalink
Update pre-commit-integration.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mihirhasan committed Jul 30, 2021
1 parent b3a9cb9 commit f6c49aa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/integrations/pre-commit-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
- id: terraform-pre-commit
args: [ '-i <IAC PROVIDER>'] #optional
```
**Note**
**Note:**
The optional args line allows you to specify the IaC provider. For example,
```yaml
repos:
Expand All @@ -33,7 +33,11 @@ repos:
- id: terraform-pre-commit
args: [ '-i k8s']
```
will cause 'terrascan scan -i k8s' to run and thus scan kubernetes yaml files. You may exclude the args like so:
will cause
```bash
'terrascan scan -i k8s'
```
to run and thus scan kubernetes yaml files. You may exclude the args like so:
```yaml
repos:
- repo: https://github.com/accurics/terrascan
Expand All @@ -51,7 +55,7 @@ ___

Once you have everything installed, and add the appropriate config file to your repo,
```bash
'Terrascan scan -i <IAC PROVIDER>'
'terrascan scan -i <IAC PROVIDER>'
```
everytime you attempt to commit your staged changes. You can also call the hook directly on all files using pre-commit run --all-files

Expand Down

0 comments on commit f6c49aa

Please sign in to comment.