Add pattern_matching and fallthrough rules

This commit is contained in:
Vlad 2021-02-11 17:45:45 +03:00
parent 54fd9f1106
commit 2c97109908
1 changed files with 12 additions and 0 deletions

View File

@ -284,6 +284,18 @@ custom_rules:
message: "Use a local function instead of capture strong self"
severity: error
pattern_matching:
name: "Pattern matching"
regex: 'case[^\(]+\([^\)]*(let|var)\s'
message: "Use a let|var keyword behind parentheses"
severity: error
fallthrough:
name: "Fallthrough"
regex: '\sfallthrough\s'
message: "Fallthrough usage is restricted!"
severity: error
# Rx
unused_map_parameter: