-
If you are adding a new group goes to patterns folder and YAML file with the group name.
-
The file includes list of patterns with the following format
- from: "" test: "" description: "" id: ""
from
: Should be the same as the group file name.test
: Is the pattern Regex.description
: Description of the patternid
: unique pattern name. the id should be in this format:{group_name}
:{pattern_id}
-
We create a unitest for each pattern to test the regex.
- Go to shellfirm/test/checks folder and create new pattern test. the format of the file name should be the pattern id. note replace the
:
with-
char - the test file should include a list of tests with the following format:
- test: crontab -r description: match command
- Go to shellfirm/test/checks folder and create new pattern test. the format of the file name should be the pattern id. note replace the
-
Run
cargo insta test --review
to validate and approve your snapshot -
You can also run the command
cargo run pre-command --command "COMMAND"
to check the integration when executing shellfirm binary