We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d0722a commit b7b4af7Copy full SHA for b7b4af7
Dangerfile.swift
@@ -0,0 +1,14 @@
1
+// swiftlint:disable line_length
2
+import Danger
3
+
4
+let danger = Danger()
5
+let allSourceFiles = danger.git.modifiedFiles + danger.git.createdFiles
6
7
+if allSourceFiles.first(where: { $0.fileType == .swift }) != nil {
8
+ // Only modified and created files are linted.
9
+ // See https://github.com/danger/swift/blob/d951a755f7e9335321160272698a2ede9dc572a3/Sources/Danger/Plugins/SwiftLint/SwiftLint.swift#L91
10
+ let violation = SwiftLint.lint()
11
+ if violation.isEmpty {
12
+ message("No violation found!!!")
13
+ }
14
+}
0 commit comments