diff --git a/docsets/SwiftLintFramework.docset/Contents/Resources/Documents/no_magic_numbers.html b/docsets/SwiftLintFramework.docset/Contents/Resources/Documents/no_magic_numbers.html index 69e69679ea..f0e217dc95 100644 --- a/docsets/SwiftLintFramework.docset/Contents/Resources/Documents/no_magic_numbers.html +++ b/docsets/SwiftLintFramework.docset/Contents/Resources/Documents/no_magic_numbers.html @@ -337,7 +337,7 @@
var foo = 123
@@ -377,6 +377,18 @@ Non Triggering Examples
case negative = -2
}
+class FooTests: XCTestCase {
+ let array: [Int] = []
+ let bar = array[42]
+}
+
+class FooTests: XCTestCase {
+ class Bar {
+ let array: [Int] = []
+ let bar = array[42]
+ }
+}
+
foo(↓321)
diff --git a/docsets/SwiftLintFramework.docset/Contents/Resources/Documents/vertical_whitespace_closing_braces.html b/docsets/SwiftLintFramework.docset/Contents/Resources/Documents/vertical_whitespace_closing_braces.html
index a5fb1fcff4..6c82057cdb 100644
--- a/docsets/SwiftLintFramework.docset/Contents/Resources/Documents/vertical_whitespace_closing_braces.html
+++ b/docsets/SwiftLintFramework.docset/Contents/Resources/Documents/vertical_whitespace_closing_braces.html
@@ -340,19 +340,11 @@ do {
- print("x is 5")
-}
-
-do {
- print("x is 5")
-}
-
-func foo() {
- run(5) { x in
- print(x)
- }
-}
+[
+1,
+2,
+3
+]
do {
print("x is 5")
@@ -367,6 +359,10 @@ Non Triggering Examples
1
])
+do {
+ print("x is 5")
+}
+
print([foo {
var sum = 0
for i in 1...5 { sum += i }
@@ -378,11 +374,15 @@ Non Triggering Examples
return mul
}])
-[
-1,
-2,
-3
-]
+func foo() {
+ run(5) { x in
+ print(x)
+ }
+}
+
+do {
+ print("x is 5")
+}
[1, 2].map { $0 }.filter { true }
@@ -411,28 +411,17 @@ Non Triggering Examples
}
Triggering Examples
-do {
- print("x is 5")
+[
+1,
+2,
+3
↓
-
-}
+]
do {
print("x is 5")
↓
-}
-
-func foo() {
- run(5) { x in
- print(x)
- }
-↓
-}
-
-do {
- print("x is 5")
-↓
}
foo(
@@ -446,6 +435,12 @@ Triggering Examples
↓
])
+do {
+ print("x is 5")
+↓
+
+}
+
print([foo {
var sum = 0
for i in 1...5 { sum += i }
@@ -458,12 +453,17 @@ Triggering Examples
↓
}])
-[
-1,
-2,
-3
+func foo() {
+ run(5) { x in
+ print(x)
+ }
↓
-]
+}
+
+do {
+ print("x is 5")
+↓
+}
diff --git a/docsets/SwiftLintFramework.tgz b/docsets/SwiftLintFramework.tgz
index d49c4b070f..5f8bf8bc89 100644
Binary files a/docsets/SwiftLintFramework.tgz and b/docsets/SwiftLintFramework.tgz differ
diff --git a/no_magic_numbers.html b/no_magic_numbers.html
index 69e69679ea..f0e217dc95 100644
--- a/no_magic_numbers.html
+++ b/no_magic_numbers.html
@@ -337,7 +337,7 @@ No Magic Numbers
Kind: idiomatic
Analyzer rule: No
Minimum Swift compiler version: 5.0.0
-Default configuration: warning
+Default configuration: severity: warning, test_parent_classes: [“QuickSpec”, “XCTestCase”]
Non Triggering Examples
var foo = 123
@@ -377,6 +377,18 @@ Non Triggering Examples
case negative = -2
}
+class FooTests: XCTestCase {
+ let array: [Int] = []
+ let bar = array[42]
+}
+
+class FooTests: XCTestCase {
+ class Bar {
+ let array: [Int] = []
+ let bar = array[42]
+ }
+}
+
Triggering Examples
foo(↓321)
diff --git a/vertical_whitespace_closing_braces.html b/vertical_whitespace_closing_braces.html
index a5fb1fcff4..6c82057cdb 100644
--- a/vertical_whitespace_closing_braces.html
+++ b/vertical_whitespace_closing_braces.html
@@ -340,19 +340,11 @@ Vertical Whit
Default configuration: severity: warning, only_enforce_before_trivial_lines: false
Non Triggering Examples
-do {
- print("x is 5")
-}
-
-do {
- print("x is 5")
-}
-
-func foo() {
- run(5) { x in
- print(x)
- }
-}
+[
+1,
+2,
+3
+]
do {
print("x is 5")
@@ -367,6 +359,10 @@ Non Triggering Examples
1
])
+do {
+ print("x is 5")
+}
+
print([foo {
var sum = 0
for i in 1...5 { sum += i }
@@ -378,11 +374,15 @@ Non Triggering Examples
return mul
}])
-[
-1,
-2,
-3
-]
+func foo() {
+ run(5) { x in
+ print(x)
+ }
+}
+
+do {
+ print("x is 5")
+}
[1, 2].map { $0 }.filter { true }
@@ -411,28 +411,17 @@ Non Triggering Examples
}
Triggering Examples
-do {
- print("x is 5")
+[
+1,
+2,
+3
↓
-
-}
+]
do {
print("x is 5")
↓
-}
-
-func foo() {
- run(5) { x in
- print(x)
- }
-↓
-}
-
-do {
- print("x is 5")
-↓
}
foo(
@@ -446,6 +435,12 @@ Triggering Examples
↓
])
+do {
+ print("x is 5")
+↓
+
+}
+
print([foo {
var sum = 0
for i in 1...5 { sum += i }
@@ -458,12 +453,17 @@ Triggering Examples
↓
}])
-[
-1,
-2,
-3
+func foo() {
+ run(5) { x in
+ print(x)
+ }
↓
-]
+}
+
+do {
+ print("x is 5")
+↓
+}