You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
1
# Commit Lint For Danger-Swift
2
2
3
-
A [`danger-swift`]("https://github.com/danger/swift") plugin to check each commit messages on the branch. This project is inspired by [`danger-commit-lint`](https://github.com/jonallured/danger-commit_lint) and its commit linting rules are ported too.
A [`danger-swift`](https://github.com/danger/swift) plugin to check each commit messages on the branch. This project is inspired by [`danger-commit-lint`](https://github.com/jonallured/danger-commit_lint) and its commit linting rules are ported too.
4
6
5
7
## Installation
6
8
@@ -26,11 +28,11 @@ commitLint.check()
26
28
27
29
That will check each commit in the PR to ensure the following is true:
28
30
29
-
- Commit subject begins with a capital letter (`Sources/DangerSwiftLint/CommitLint/SubjectCapitalLetter`)
30
-
- Commit subject is more than one word (`Sources/DangerSwiftLint/CommitLint/SubjectWord`)
31
-
- Commit subject is no longer than 50 characters (`Sources/DangerSwiftLint/CommitLint/SubjectLength`)
32
-
- Commit subject does not end in a period (`Sources/DangerSwiftLint/CommitLint/SubjectPeriod`)
33
-
- Commit subject and body are separated by an empty line (`Sources/DangerSwiftLint/CommitLint/BodyEmptyLine`)
31
+
- Commit subject begins with a capital letter ([`SubjectCapitalLetter.swift`](Sources/DangerSwiftCommitLint/CommitLint/SubjectCapitalLetter.swift))
32
+
- Commit subject is more than one word ([`SubjectWord.swift`](Sources/DangerSwiftCommitLint/CommitLint/SubjectWord.swift))
33
+
- Commit subject is no longer than 50 characters ([`SubjectLength.swift`](Sources/DangerSwiftCommitLint/CommitLint/SubjectLength.swift))
34
+
- Commit subject does not end in a period ([`SubjectPeriod.swift`](Sources/DangerSwiftCommitLint/CommitLint/SubjectPeriod.swift))
35
+
- Commit subject and body are separated by an empty line ([`BodyEmptyLine.swift`](Sources/DangerSwiftCommitLint/CommitLint/BodyEmptyLine.swift))
34
36
35
37
By default, Commit Lint fails, but you can configure this behavior.
36
38
@@ -52,11 +54,11 @@ commitLint.check()
52
54
53
55
The commit lint can be configured with following 5 parameters.
54
56
55
-
-`disabled`: can be `.all` or `.selected([ ... ])`, see [`DangerSwiftCommitLint/Configuration`]("DangerSwiftCommitLint/Configuration")
56
-
-`warn`: can be `.all` or `.selected([ ... ])`, see [`DangerSwiftCommitLint/Configuration`]("DangerSwiftCommitLint/Configuration")
57
-
-`fail`: can be `.all` or `.selected([ ... ])`, see [`DangerSwiftCommitLint/Configuration`]("DangerSwiftCommitLint/Configuration")
57
+
-`disabled`: can be `.all` or `.selected([ ... ])`, see [`Configuration.swift`](Sources/DangerSwiftCommitLint/Configuration.swift)
58
+
-`warn`: can be `.all` or `.selected([ ... ])`, see [`Configuration.swift`](Sources/DangerSwiftCommitLint/Configuration.swift)
59
+
-`fail`: can be `.all` or `.selected([ ... ])`, see [`Configuration.swift`](Sources/DangerSwiftCommitLint/Configuration.swift)
58
60
-`limit`: limits the number commits to lint. E.g. `limit: 1` will limit the commit to the oldest commit on the branch
59
-
-`custom`: allow caller to pass an array of custom linter that conforms to `DangerSwiftCommitLint.CommitLint` protocol
61
+
-`custom`: allow caller to pass an array of custom linter that conforms to [`CommitLint`](Sources/DangerSwiftCommitLint/CommitLint/CommitLint.swift) protocol
0 commit comments