mirror of
https://github.com/realm/SwiftLint.git
synced 2026-05-07 20:12:49 +00:00
Fix incorrect regex patterns in README files (#3393)
This commit is contained in:
@@ -398,7 +398,7 @@ custom_rules:
|
||||
included: ".*\\.swift" # regex that defines paths to include during linting. optional.
|
||||
excluded: ".*Test\\.swift" # regex that defines paths to exclude during linting. optional
|
||||
name: "Pirates Beat Ninjas" # rule name. optional.
|
||||
regex: "([n,N]inja)" # matching pattern
|
||||
regex: "([nN]inja)" # matching pattern
|
||||
capture_group: 0 # number of regex capture group to highlight the rule violation at. optional.
|
||||
match_kinds: # SyntaxKinds to match. optional.
|
||||
- comment
|
||||
@@ -406,7 +406,7 @@ custom_rules:
|
||||
message: "Pirates are better than ninjas." # violation message. optional.
|
||||
severity: error # violation severity. optional.
|
||||
no_hiding_in_strings:
|
||||
regex: "([n,N]inja)"
|
||||
regex: "([nN]inja)"
|
||||
match_kinds: string
|
||||
```
|
||||
|
||||
|
||||
+2
-2
@@ -294,14 +294,14 @@ reporter: "xcode" # 报告类型 (xcode, json, csv, checkstyle, junit, html, emo
|
||||
custom_rules:
|
||||
pirates_beat_ninjas: # 规则标识符
|
||||
name: "Pirates Beat Ninjas" # 规则名称,可选
|
||||
regex: "([n,N]inja)" # 匹配的模式
|
||||
regex: "([nN]inja)" # 匹配的模式
|
||||
match_kinds: # 需要匹配的语法类型,可选
|
||||
- comment
|
||||
- identifier
|
||||
message: "Pirates are better than ninjas." # 提示信息,可选
|
||||
severity: error # 提示的级别,可选
|
||||
no_hiding_in_strings:
|
||||
regex: "([n,N]inja)"
|
||||
regex: "([nN]inja)"
|
||||
match_kinds: string
|
||||
```
|
||||
|
||||
|
||||
+2
-2
@@ -270,14 +270,14 @@ custom_rules:
|
||||
pirates_beat_ninjas: # 룰 식별자
|
||||
included: ".*.swift" # 린트 실행시 포함할 경로를 정의하는 정규표현식. 선택 가능.
|
||||
name: "Pirates Beat Ninjas" # 룰 이름. 선택 가능.
|
||||
regex: "([n,N]inja)" # 패턴 매칭
|
||||
regex: "([nN]inja)" # 패턴 매칭
|
||||
match_kinds: # 매칭할 SyntaxKinds. 선택 가능.
|
||||
- comment
|
||||
- identifier
|
||||
message: "Pirates are better than ninjas." # 위반 메시지. 선택 가능.
|
||||
severity: error # 위반 수준. 선택 가능.
|
||||
no_hiding_in_strings:
|
||||
regex: "([n,N]inja)"
|
||||
regex: "([nN]inja)"
|
||||
match_kinds: string
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user