Updated SC2221 (markdown)

koalaman
2017-09-16 15:48:18 -07:00
parent 9cee30cb7a
commit 1bc882d822

@@ -21,7 +21,7 @@ esac
```
### Rationale:
You have specified multiple patterns in a `case` statement, where one will always override the other.
You have specified multiple patterns in a `case` statement, where one will always override the other. The pattern being overridden is indicated with a [[SC2222]] warning.
In the example, `-?` actually matches a dash followed by any character, such as `-n`. This means that the later `-n` branch will never trigger. In this case, the correct solution is to escape the `-\?` so that it doesn't match `-n`.