Exclude specific issues during shellcheck scan (closes #22)#39
Exclude specific issues during shellcheck scan (closes #22)#39
Conversation
entrypoint.sh
Outdated
| fi | ||
|
|
||
| optional_params="" | ||
| if [[ ! -z "$exclude_code" ]]; then |
| @@ -0,0 +1,6 @@ | |||
| #! /bin/bash | |||
There was a problem hiding this comment.
how about renaming the folder to exclude_issues to be more descriptive.
| @@ -0,0 +1,41 @@ | |||
| #! /bin/bash | |||
|
|
|||
| source ./entrypoint.sh "" "" "" "--test" | |||
There was a problem hiding this comment.
same here. Lets rename the test file to exclude_issues_tests.sh
| local expected_second_error="SC1068" | ||
| local actual_message=$(process_input) | ||
|
|
||
| assertContains "Did not find the message." "$actual_message" "$expected_first_error" |
There was a problem hiding this comment.
To assure that the SC2039 code is excluded, we should also add an assertion like assertNotContains to check that the actual_message doesn't contain the excluded_code.
| test_exclude_multiple_errors(){ | ||
| input_paths="./test_data/exclude/test_script_exclude_multiple_errors.sh" | ||
| severity_mode="style" | ||
| exclude_code="SC2034,SC2005,SC2034,SC1066" |
| assertContains "Did not find the message." "$actual_message" "$expected_message" | ||
| } | ||
|
|
||
| tearDown(){ |
There was a problem hiding this comment.
not sure if we need this tearDown() function here
README.md
Outdated
|
|
||
| Optional. Specify minimum severity of errors to consider [style, info, warning, error]. Default: `style` | ||
|
|
||
| ### `exclude` |
There was a problem hiding this comment.
Since we are adding another input for excluding files and folders, we need to be more specific in naming. How about using exclude_issues?
Fix error `every step must define a `uses` or `run` key` Co-authored-by: Justin Watts <justin@azohra.com>
1b40ba5 to
cba41f1
Compare
…aming of the feature in the README and scripts
|
Closing this PR as the more up to date branch is already merged #63 |
Pull Request Checklist
Corresponding Issue
Description of Change
Motivation and Context
Testing Steps
Risks
Additional Information