Adding upstream version 0.13.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
1805ece79d
commit
d8f166e6bb
167 changed files with 15302 additions and 0 deletions
0
qa/samples/config/contrib-enabled
Normal file
0
qa/samples/config/contrib-enabled
Normal file
13
qa/samples/config/gitlintconfig
Normal file
13
qa/samples/config/gitlintconfig
Normal file
|
@ -0,0 +1,13 @@
|
|||
[general]
|
||||
ignore=title-trailing-punctuation,B2
|
||||
verbosity = 2
|
||||
|
||||
[title-max-length]
|
||||
line-length=20
|
||||
|
||||
[B1]
|
||||
# B1 = body-max-line-length
|
||||
line-length=30
|
||||
|
||||
[title-must-not-contain-word]
|
||||
words=WIP,thåt
|
7
qa/samples/config/ignore-release-commits
Normal file
7
qa/samples/config/ignore-release-commits
Normal file
|
@ -0,0 +1,7 @@
|
|||
[ignore-by-title]
|
||||
regex=^Release(.*)
|
||||
ignore=T5,T3
|
||||
|
||||
[ignore-by-body]
|
||||
regex=(.*)relëase(.*)
|
||||
ignore=T3,B3
|
29
qa/samples/user_rules/extra/extra_rules.py
Normal file
29
qa/samples/user_rules/extra/extra_rules.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
from gitlint.rules import CommitRule, RuleViolation
|
||||
from gitlint.utils import sstr
|
||||
|
||||
|
||||
class GitContextRule(CommitRule):
|
||||
""" Rule that tests whether we can correctly access certain gitcontext properties """
|
||||
name = "gitcontext"
|
||||
id = "UC1"
|
||||
|
||||
def validate(self, commit):
|
||||
violations = [
|
||||
RuleViolation(self.id, "GitContext.current_branch: {0}".format(commit.context.current_branch), line_nr=1),
|
||||
RuleViolation(self.id, "GitContext.commentchar: {0}".format(commit.context.commentchar), line_nr=1)
|
||||
]
|
||||
|
||||
return violations
|
||||
|
||||
|
||||
class GitCommitRule(CommitRule):
|
||||
""" Rule that tests whether we can correctly access certain commit properties """
|
||||
name = "gitcommit"
|
||||
id = "UC2"
|
||||
|
||||
def validate(self, commit):
|
||||
violations = [
|
||||
RuleViolation(self.id, "GitCommit.branches: {0}".format(sstr(commit.branches)), line_nr=1),
|
||||
]
|
||||
|
||||
return violations
|
8
qa/samples/user_rules/incorrect_linerule/my_line_rule.py
Normal file
8
qa/samples/user_rules/incorrect_linerule/my_line_rule.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from gitlint.rules import LineRule
|
||||
|
||||
|
||||
class MyUserLineRule(LineRule):
|
||||
id = "UC2"
|
||||
name = "my-line-rule"
|
||||
|
||||
# missing validate method, missing target attribute
|
Loading…
Add table
Add a link
Reference in a new issue