Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The COM.FLOW.CaseSwitch rule doesn't manage a case inside a case correctly #135

Closed
brigittehuynh opened this issue Jul 18, 2018 · 0 comments
Assignees

Comments

@brigittehuynh
Copy link
Collaborator

Expected behaviour

When a case is nested inside a case, neither having a default, both esac endings should cause a violation

Actual behavior

There is only one violation, on the first esac found.

Steps to reproduce behavior

Code to reproduce:
while true; do
read SELECT
case $SELECT in
1) print "a) option a"
print "b) option b"
while read SELECT2;do
case $SELECT2 in
"a") print "A selected";;
"b") print "B selected";;
esac
break 2
done;;
2) print "2 selected";;
esac
break
done

Detection version

3.1.0-dev version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants