git-lint 7.0.0 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +14 -7
- data/git-lint.gemspec +2 -2
- data/lib/git/lint/analyzers/commit_body_bullet_capitalization.rb +1 -1
- data/lib/git/lint/configuration/defaults.yml +5 -5
- data/lib/git/lint/validators/repeated_word.rb +21 -12
- data.tar.gz.sig +0 -0
- metadata +5 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbecb342f45a5216dfdbf7c947467c6d565d8a1f98481d8a7765f2de1b7cc621
|
4
|
+
data.tar.gz: cd56aed86788d514cde91d342fc9acdafa4d4d42957a473902d361782bb98375
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a6d9d4edb2b3410956f8e47ea213c35702be39bcbc2a0321565f5f029a59a5deede96a89f81ba64d749e4316d4be85455c81a9262dd2c2a8498ef47a32e40bc
|
7
|
+
data.tar.gz: e3a1bcf8e6e06877b53b50b151734b3770fa7be872e3496918810328e772390d9c6f59dc1a21f3ca7242f1667baafea45e41af230ccf11419834d6be2f56e324
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -394,7 +394,7 @@ Kaywinnet Lee Frye
|
|
394
394
|
[options="header"]
|
395
395
|
|===
|
396
396
|
| Enabled | Severity | Defaults
|
397
|
-
| true | error | includes: `["
|
397
|
+
| true | error | includes: `["\\*", "\\-"]`
|
398
398
|
|===
|
399
399
|
|
400
400
|
Ensures commit body bullet lines are capitalized. Example:
|
@@ -404,15 +404,22 @@ Ensures commit body bullet lines are capitalized. Example:
|
|
404
404
|
- an example bullet.
|
405
405
|
|
406
406
|
# Allowed
|
407
|
-
|
407
|
+
* An ASCII Doc bullet.
|
408
|
+
* link:https://demo.com[Demo]
|
409
|
+
* link:https://demo.com[demo]
|
410
|
+
- A Markdown bullet.
|
411
|
+
- [Demo](https://demo.com)
|
412
|
+
- [demo](https://demo.com)
|
408
413
|
....
|
409
414
|
|
415
|
+
In general, using ASCII Doc or Markdown syntax directly after a bullet will cause capitalization checks to be ignored because there can be valid reasons for wanting to avoid capitalization in those situations.
|
416
|
+
|
410
417
|
==== Commit Body Bullet Delimiter
|
411
418
|
|
412
419
|
[options="header"]
|
413
420
|
|===
|
414
421
|
| Enabled | Severity | Defaults
|
415
|
-
| true | error | includes: `["
|
422
|
+
| true | error | includes: `["\\*", "\\-"]`
|
416
423
|
|===
|
417
424
|
|
418
425
|
Ensures commit body bullets are delimited by a space. Example:
|
@@ -430,7 +437,7 @@ Ensures commit body bullets are delimited by a space. Example:
|
|
430
437
|
[options="header"]
|
431
438
|
|===
|
432
439
|
| Enabled | Severity | Defaults
|
433
|
-
| true | error | includes: `["
|
440
|
+
| true | error | includes: `["\\*", "\\-"]`
|
434
441
|
|===
|
435
442
|
|
436
443
|
Ensures a single bullet is never used when a paragraph could be used instead. Example:
|
@@ -676,7 +683,7 @@ a Git Hook in order to not disturb interactive rebase workflows.
|
|
676
683
|
[options="header"]
|
677
684
|
|===
|
678
685
|
| Enabled | Severity | Defaults
|
679
|
-
| true | error | excludes: `["
|
686
|
+
| true | error | excludes: `["\\!", "\\.", "\\?"]`
|
680
687
|
|===
|
681
688
|
|
682
689
|
Ensures commit subjects are suffixed consistently. The exclude list _is_ case sensitive and prevents
|
@@ -1176,12 +1183,12 @@ You can add Rake support by adding the following to your `Rakefile`:
|
|
1176
1183
|
[source,ruby]
|
1177
1184
|
----
|
1178
1185
|
begin
|
1179
|
-
|
1186
|
+
require "git/lint/rake/register"
|
1180
1187
|
rescue LoadError => error
|
1181
1188
|
puts error.message
|
1182
1189
|
end
|
1183
1190
|
|
1184
|
-
|
1191
|
+
Git::Lint::Rake::Register.call
|
1185
1192
|
----
|
1186
1193
|
|
1187
1194
|
Once required and registered, the following tasks will be available (i.e. `bundle exec rake -T`):
|
data/git-lint.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "git-lint"
|
5
|
-
spec.version = "7.
|
5
|
+
spec.version = "7.1.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/git-lint"
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_dependency "dry-monads", "~> 1.6"
|
30
30
|
spec.add_dependency "dry-schema", "~> 1.13"
|
31
31
|
spec.add_dependency "etcher", "~> 1.0"
|
32
|
-
spec.add_dependency "gitt", "~> 3.
|
32
|
+
spec.add_dependency "gitt", "~> 3.2"
|
33
33
|
spec.add_dependency "infusible", "~> 3.0"
|
34
34
|
spec.add_dependency "refinements", "~> 12.0"
|
35
35
|
spec.add_dependency "runcom", "~> 11.0"
|
@@ -15,20 +15,20 @@ commits:
|
|
15
15
|
enabled: true
|
16
16
|
severity: error
|
17
17
|
includes:
|
18
|
-
- "\\-"
|
19
18
|
- "\\*"
|
19
|
+
- "\\-"
|
20
20
|
bullet_delimiter:
|
21
21
|
enabled: true
|
22
22
|
severity: error
|
23
23
|
includes:
|
24
|
-
- "\\-"
|
25
24
|
- "\\*"
|
25
|
+
- "\\-"
|
26
26
|
bullet_only:
|
27
27
|
enabled: true
|
28
28
|
severity: error
|
29
29
|
includes:
|
30
|
-
- "\\-"
|
31
30
|
- "\\*"
|
31
|
+
- "\\-"
|
32
32
|
leading_line:
|
33
33
|
enabled: true
|
34
34
|
severity: warn
|
@@ -79,8 +79,8 @@ commits:
|
|
79
79
|
enabled: true
|
80
80
|
severity: error
|
81
81
|
excludes:
|
82
|
-
- "(f|F)ix(es|ed)?\\s\\#\\d+"
|
83
82
|
- "(c|C)lose(s|d)?\\s\\#\\d+"
|
83
|
+
- "(f|F)ix(es|ed)?\\s\\#\\d+"
|
84
84
|
- "(r|R)esolve(s|d)?\\s\\#\\d+"
|
85
85
|
word_repeat:
|
86
86
|
enabled: true
|
@@ -109,9 +109,9 @@ commits:
|
|
109
109
|
enabled: true
|
110
110
|
severity: error
|
111
111
|
excludes:
|
112
|
+
- "\\!"
|
112
113
|
- "\\."
|
113
114
|
- "\\?"
|
114
|
-
- "\\!"
|
115
115
|
word_repeat:
|
116
116
|
enabled: true
|
117
117
|
severity: error
|
@@ -7,29 +7,38 @@ module Git
|
|
7
7
|
module Validators
|
8
8
|
# Validates content has no repeated words.
|
9
9
|
class RepeatedWord
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
10
|
+
PATTERNS = {
|
11
|
+
word: /
|
12
|
+
\w+(?=\s) # Match word with trailing space.
|
13
|
+
| # Or.
|
14
|
+
(?<=\s)\w+(?=\s) # Match word between two spaces.
|
15
|
+
| # Or.
|
16
|
+
(?<=\s)\w+ # Match word with leading space.
|
17
|
+
/x,
|
18
|
+
code_block: /`.+`/
|
19
|
+
}.freeze
|
20
|
+
|
21
|
+
def initialize patterns: PATTERNS
|
22
|
+
@patterns = patterns
|
20
23
|
end
|
21
24
|
|
22
25
|
def call(content) = content ? scan(content) : Core::EMPTY_ARRAY
|
23
26
|
|
24
27
|
private
|
25
28
|
|
26
|
-
attr_reader :
|
29
|
+
attr_reader :patterns
|
27
30
|
|
28
31
|
def scan content
|
29
|
-
content
|
32
|
+
parse(content).each_cons(2).with_object [] do |(current, future), repeats|
|
30
33
|
repeats.append future if current.casecmp(future).zero?
|
31
34
|
end
|
32
35
|
end
|
36
|
+
|
37
|
+
def parse(content) = content.gsub(code_block_pattern, "").scan word_pattern
|
38
|
+
|
39
|
+
def word_pattern = patterns.fetch :word
|
40
|
+
|
41
|
+
def code_block_pattern = patterns.fetch :code_block
|
33
42
|
end
|
34
43
|
end
|
35
44
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2024-
|
38
|
+
date: 2024-03-03 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: cogger
|
@@ -127,14 +127,14 @@ dependencies:
|
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '3.
|
130
|
+
version: '3.2'
|
131
131
|
type: :runtime
|
132
132
|
prerelease: false
|
133
133
|
version_requirements: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
135
|
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: '3.
|
137
|
+
version: '3.2'
|
138
138
|
- !ruby/object:Gem::Dependency
|
139
139
|
name: infusible
|
140
140
|
requirement: !ruby/object:Gem::Requirement
|
@@ -347,7 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
347
347
|
- !ruby/object:Gem::Version
|
348
348
|
version: '0'
|
349
349
|
requirements: []
|
350
|
-
rubygems_version: 3.5.
|
350
|
+
rubygems_version: 3.5.6
|
351
351
|
signing_key:
|
352
352
|
specification_version: 4
|
353
353
|
summary: A command line interface for linting Git commits.
|
metadata.gz.sig
CHANGED
Binary file
|