git-lint 7.0.0 → 7.2.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 +15 -8
- data/git-lint.gemspec +4 -4
- 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 +9 -9
- 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: fcc9a89d1f6ab23bfdbe7532dc16b78e88d8080e8ed01aeb94395a333d37835a
|
4
|
+
data.tar.gz: 6819ade704aa18ccb86af366fe3078a72670eefcc16b9a40a736749e188ab969
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cfed461a4afc9878e7312db8e96bec4d08a7aafbedd184d5b054676a7ada2f55cc56719b77205689f68813f8a2224b9f464296accd1d60188d9df63a04591e2
|
7
|
+
data.tar.gz: 7681ade12e5e42d5e319275fd197527e1abc13d10e75369c8ff583f3138fe809490ff2a1f2412e56eaf9e34efc1b992de05822d96b21c7a3c3e0705d068f154c
|
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`):
|
@@ -1222,7 +1229,7 @@ jobs:
|
|
1222
1229
|
image: ruby:latest
|
1223
1230
|
steps:
|
1224
1231
|
- name: Checkout
|
1225
|
-
uses: actions/checkout@
|
1232
|
+
uses: actions/checkout@v4
|
1226
1233
|
with:
|
1227
1234
|
fetch-depth: 0
|
1228
1235
|
ref: ${{github.head_ref}}
|
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.2.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,9 +29,9 @@ 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.
|
33
|
-
spec.add_dependency "infusible", "~> 3.
|
34
|
-
spec.add_dependency "refinements", "~> 12.
|
32
|
+
spec.add_dependency "gitt", "~> 3.2"
|
33
|
+
spec.add_dependency "infusible", "~> 3.4"
|
34
|
+
spec.add_dependency "refinements", "~> 12.1"
|
35
35
|
spec.add_dependency "runcom", "~> 11.0"
|
36
36
|
spec.add_dependency "sod", "~> 0.4"
|
37
37
|
spec.add_dependency "spek", "~> 3.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.2.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-27 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: cogger
|
@@ -127,42 +127,42 @@ 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
|
141
141
|
requirements:
|
142
142
|
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '3.
|
144
|
+
version: '3.4'
|
145
145
|
type: :runtime
|
146
146
|
prerelease: false
|
147
147
|
version_requirements: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
149
|
- - "~>"
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: '3.
|
151
|
+
version: '3.4'
|
152
152
|
- !ruby/object:Gem::Dependency
|
153
153
|
name: refinements
|
154
154
|
requirement: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: '12.
|
158
|
+
version: '12.1'
|
159
159
|
type: :runtime
|
160
160
|
prerelease: false
|
161
161
|
version_requirements: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
163
|
- - "~>"
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: '12.
|
165
|
+
version: '12.1'
|
166
166
|
- !ruby/object:Gem::Dependency
|
167
167
|
name: runcom
|
168
168
|
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.7
|
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
|