Skip to content

Commit ba239c5

Browse files
Wei SunWei Sun
authored andcommitted
[Danger] Lint myself
1 parent 21dcb3c commit ba239c5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Dangerfile.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Danger
2+
import DangerSwiftCommitLint
23
import Foundation
34

45
let danger = Danger()
@@ -37,3 +38,7 @@ let foundWIPLabel = github.issue.labels.contains {
3738
if foundWIPMessageInTitle || foundWIPLabel {
3839
warn("PR is classed as Work in Progress")
3940
}
41+
42+
let configuration = DangerSwiftCommitLint.Configuration(warn: .all)
43+
let commitLint = DangerSwiftCommitLint(danger: danger, configuration: configuration)
44+
commitLint.check()

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let package = Package(
1818
.package(url: "https://github.com/realm/SwiftLint", from: "0.43.0"), // dev
1919
],
2020
targets: [
21-
.target(name: "DangerDependencies", dependencies: [.product(name: "Danger", package: "danger-swift"), "DangerSwiftCoverage"]), // dev
21+
.target(name: "DangerDependencies", dependencies: [.product(name: "Danger", package: "danger-swift"), "DangerSwiftCoverage", "DangerSwiftCommitLint"]), // dev
2222
.target(name: "DangerSwiftCommitLint", dependencies: [.product(name: "Danger", package: "danger-swift")]),
2323
.testTarget(
2424
name: "DangerSwiftCommitLintTests",

0 commit comments

Comments
 (0)