v0.18.0
v0.18.0 (2023-11-14)
Feature
- feat: 154 Prompt User to Install Code Linters for each Detected Language (#332)
closes #154
Overview
Adds functionality to prompt the user to determine if linter based
pre-commit hooks should be added to the code repository. The user will
be prompted for each detected language during init
.
An example messages will be Add lint pre-commit(s) for JavaScript? [Y/n]
adding the --yes
option will bypass the prompting to install linter
pre-commit hooks and will automatically add them.
Technical Approach
This pr includes reorganizing the pre-commit templates into a new
folder/file structure. Templates will be located under
resources/pre-commit
and will be split into separate folders and files
based on if they are linter hooks or not. The user responses and code
will determine whether or not the hooks should be combined and saved to
the user's repository. Splitting these files out ensures a simple way of
knowing which hooks are linters.
Testing
- run
secureli init
- follow flow to add/ignore linters for each detected language
- Verify pre-commit linters are added or not added to pre-commit.yaml
depending on prompt response
Regression testing:
Testing scan
and update
to ensure both are working as normal. (c63860f
)