git-lint 8.2.0 → 8.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87c9c18ddd17dd366a4f75889876a65fde5790c5076be1f8d8000c148cf06b64
4
- data.tar.gz: 4b884cd402e6c6832a80c5f07f4515674f07f5b9c92766c6c612706e6563a949
3
+ metadata.gz: d724c67481c50d6704c35400508733853a17b309817b8e03fbd275924cdfd4a0
4
+ data.tar.gz: 0ca21bdac5ecef29e7168f91ef3636ae913d3ec04d9a91ca408685a1f5e4055e
5
5
  SHA512:
6
- metadata.gz: 59d08fb840358ff45fb88a5ea97b4f21dc6d49865c4f9b255d8eef2640fd19378c1599762a15152d6d02722ae9e09409ed7dd39c79028a6ff751b115d8255257
7
- data.tar.gz: 77b58c8455238d5700f479ba459b0f6751e78bf218cad531b2c73f53a8f80bc7ee68ffb315ac3296fe4acb91670baca526a4cd1edfc8a5d3b4a1a35b0c984a4d
6
+ metadata.gz: d2f2cc34f636efdf84cff02e286df7a617ddc0404344d104d84093b76a1f510023bc07c16ca9568e1bca92388086c493e04b4b24e140df030e8f5b3c78224315
7
+ data.tar.gz: 3c7248a180b7f57645a0988e3d19ddfb8fadbeef93c864f25372880f350b55e51ff7dc55a8dfd69a5cb25faa601043c73b77145d08c5ac73e8c48e1307bc9cf4
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -2,7 +2,9 @@
2
2
  :toclevels: 5
3
3
  :figure-caption!:
4
4
 
5
+ :ascii_doc_link: link:https://docs.asciidoctor.org/asciidoc/latest[ASCII Doc]
5
6
  :git_rebase_workflow_link: link:https://alchemists.io/articles/git_rebase[Git Rebase Workflow]
7
+ :markdown_link: link:https://daringfireball.net/projects/markdown[Markdown]
6
8
 
7
9
  = Git Lint
8
10
 
@@ -412,7 +414,7 @@ Ensures commit body bullet lines are capitalized. Example:
412
414
  - [demo](https://demo.com)
413
415
  ....
414
416
 
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.
417
+ In general, using {ascii_doc_link} or {markdown_link} 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
418
 
417
419
  ==== Commit Body Bullet Delimiter
418
420
 
@@ -513,6 +515,13 @@ curabitur eleifend wisi iaculis ipsum.
513
515
  Curabitur eleifend wisi iaculis ipsum.
514
516
  ....
515
517
 
518
+ {ascii_doc_link} and {markdown_link} code blocks are ignored since a paragraph that only consists of a code block is common practice. For ASCII Doc, this includes the following to be separate paragraphs if desired:
519
+
520
+ * link:https://docs.asciidoctor.org/asciidoc/latest/macros/audio-and-video[Audio and video links]
521
+ * link:https://docs.asciidoctor.org/asciidoc/latest/macros/images[Image links]
522
+ * link:https://docs.asciidoctor.org/asciidoc/latest/macros/links[Links]
523
+ * link:https://docs.asciidoctor.org/asciidoc/latest/macros/xref[Cross references]
524
+
516
525
  ==== Commit Body Phrase
517
526
 
518
527
  [options="header"]
@@ -1392,6 +1401,8 @@ bin/rake
1392
1401
 
1393
1402
  == link:https://alchemists.io/policies/contributions[Contributions]
1394
1403
 
1404
+ == link:https://alchemists.io/policies/developer_certificate_of_origin[Developer Certificate of Origin]
1405
+
1395
1406
  == link:https://alchemists.io/projects/git-lint/versions[Versions]
1396
1407
 
1397
1408
  == link:https://alchemists.io/community[Community]
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 = "8.2.0"
5
+ spec.version = "8.4.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/git-lint"
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.metadata = {
13
13
  "bug_tracker_uri" => "https://github.com/bkuhlmann/git-lint/issues",
14
14
  "changelog_uri" => "https://alchemists.io/projects/git-lint/versions",
15
- "documentation_uri" => "https://alchemists.io/projects/git-lint",
15
+ "homepage_uri" => "https://alchemists.io/projects/git-lint",
16
16
  "funding_uri" => "https://github.com/sponsors/bkuhlmann",
17
17
  "label" => "Git Lint",
18
18
  "rubygems_mfa_required" => "true",
@@ -22,16 +22,16 @@ Gem::Specification.new do |spec|
22
22
  spec.signing_key = Gem.default_key_path
23
23
  spec.cert_chain = [Gem.default_cert_path]
24
24
 
25
- spec.required_ruby_version = "~> 3.3"
26
- spec.add_dependency "cogger", "~> 0.21"
25
+ spec.required_ruby_version = ">= 3.3", "<= 3.4"
26
+ spec.add_dependency "cogger", "~> 0.26"
27
27
  spec.add_dependency "containable", "~> 0.2"
28
- spec.add_dependency "core", "~> 1.0"
28
+ spec.add_dependency "core", "~> 1.7"
29
29
  spec.add_dependency "dry-monads", "~> 1.6"
30
30
  spec.add_dependency "dry-schema", "~> 1.13"
31
31
  spec.add_dependency "etcher", "~> 2.1"
32
- spec.add_dependency "gitt", "~> 3.6"
32
+ spec.add_dependency "gitt", "~> 3.9"
33
33
  spec.add_dependency "infusible", "~> 3.8"
34
- spec.add_dependency "refinements", "~> 12.7"
34
+ spec.add_dependency "refinements", "~> 12.8"
35
35
  spec.add_dependency "runcom", "~> 11.5"
36
36
  spec.add_dependency "sod", "~> 0.14"
37
37
  spec.add_dependency "spek", "~> 3.0"
@@ -66,10 +66,6 @@ module Git
66
66
  trailers << self.class.build_issue_line(index, trailer.to_s)
67
67
  end
68
68
  end
69
-
70
- def invalid_line?(*)
71
- fail NoMethodError, "The `.#{__method__}` method must be implemented."
72
- end
73
69
  end
74
70
  end
75
71
  end
@@ -5,11 +5,30 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes proper capitalization of commit body paragraphs.
7
7
  class CommitBodyParagraphCapitalization < Abstract
8
- def self.invalid?(line) = line.match?(/\A[[:lower:]].+\Z/m)
9
-
10
- def initialize(...)
11
- super
12
- @invalids = commit.body_paragraphs.select { |line| self.class.invalid? line }
8
+ PATTERN = /
9
+ \A # Search start.
10
+ (?! # Negative lookahead start.
11
+ (?: # Non-capture group start.
12
+ audio # Ignore audio.
13
+ | # Or.
14
+ image # Ignore image.
15
+ | # Or.
16
+ video # Ignore video.
17
+ ) # Non-capture group end.
18
+ :: # Suffix.
19
+ | # Or.
20
+ link: # Ignore link.
21
+ | # Or.
22
+ xref: # Ignore xref.
23
+ ) # Negative lookahead end.
24
+ [[:lower:]] # Match lowercase letters.
25
+ .+ # Match one or more characters.
26
+ \Z # Search end.
27
+ /mx
28
+
29
+ def initialize(commit, pattern: PATTERN, **)
30
+ super(commit, **)
31
+ @pattern = pattern
13
32
  end
14
33
 
15
34
  def valid? = invalids.empty?
@@ -25,13 +44,17 @@ module Git
25
44
 
26
45
  private
27
46
 
28
- attr_reader :invalids
47
+ attr_reader :pattern
29
48
 
30
49
  def affected_lines
31
50
  invalids.each.with_object [] do |line, lines|
32
51
  lines << self.class.build_issue_line(commit.body_lines.index(line[/.+/]), line)
33
52
  end
34
53
  end
54
+
55
+ def invalids
56
+ @invalids ||= commit.body_paragraphs.grep pattern
57
+ end
35
58
  end
36
59
  end
37
60
  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: 8.2.0
4
+ version: 8.4.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-08-11 00:00:00.000000000 Z
38
+ date: 2024-09-07 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -43,14 +43,14 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.21'
46
+ version: '0.26'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0.21'
53
+ version: '0.26'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: containable
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -71,14 +71,14 @@ dependencies:
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '1.0'
74
+ version: '1.7'
75
75
  type: :runtime
76
76
  prerelease: false
77
77
  version_requirements: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '1.0'
81
+ version: '1.7'
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: dry-monads
84
84
  requirement: !ruby/object:Gem::Requirement
@@ -127,14 +127,14 @@ dependencies:
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '3.6'
130
+ version: '3.9'
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.6'
137
+ version: '3.9'
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: infusible
140
140
  requirement: !ruby/object:Gem::Requirement
@@ -155,14 +155,14 @@ dependencies:
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: '12.7'
158
+ version: '12.8'
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.7'
165
+ version: '12.8'
166
166
  - !ruby/object:Gem::Dependency
167
167
  name: runcom
168
168
  requirement: !ruby/object:Gem::Requirement
@@ -325,7 +325,7 @@ licenses:
325
325
  metadata:
326
326
  bug_tracker_uri: https://github.com/bkuhlmann/git-lint/issues
327
327
  changelog_uri: https://alchemists.io/projects/git-lint/versions
328
- documentation_uri: https://alchemists.io/projects/git-lint
328
+ homepage_uri: https://alchemists.io/projects/git-lint
329
329
  funding_uri: https://github.com/sponsors/bkuhlmann
330
330
  label: Git Lint
331
331
  rubygems_mfa_required: 'true'
@@ -336,16 +336,19 @@ require_paths:
336
336
  - lib
337
337
  required_ruby_version: !ruby/object:Gem::Requirement
338
338
  requirements:
339
- - - "~>"
339
+ - - ">="
340
340
  - !ruby/object:Gem::Version
341
341
  version: '3.3'
342
+ - - "<="
343
+ - !ruby/object:Gem::Version
344
+ version: '3.4'
342
345
  required_rubygems_version: !ruby/object:Gem::Requirement
343
346
  requirements:
344
347
  - - ">="
345
348
  - !ruby/object:Gem::Version
346
349
  version: '0'
347
350
  requirements: []
348
- rubygems_version: 3.5.17
351
+ rubygems_version: 3.5.18
349
352
  signing_key:
350
353
  specification_version: 4
351
354
  summary: A command line interface for linting Git commits.
metadata.gz.sig CHANGED
Binary file