Skip to content

Commit

Permalink
Combine conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
artnc committed Jun 17, 2024
1 parent b447fb5 commit 29cf32a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions splinter
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ expecting_rule_message=true
messages=()
regexes=()
while read -r line; do
if [[ ${line} =~ ^\ *$ ]]; then
# Line contains no non-space chars
:
elif [[ ${line} =~ ^# ]]; then
# Line is a comment
if [[ ${line} =~ ^\ *$ || ${line} =~ ^# ]]; then
# Line contains no non-space chars or is a comment
:
elif [[ ${expecting_rule_message} == true ]]; then
# Line is a rule message
Expand Down

0 comments on commit 29cf32a

Please sign in to comment.