git-lint 8.3.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: 77493699e7119986f737326eefb49e64de1c4141149829f77326f8ce350f74c4
4
- data.tar.gz: 02630b975bb5a925f9e4bf9140a051dc71f81f8a03ed8fc48117a99214a0b0e2
3
+ metadata.gz: d724c67481c50d6704c35400508733853a17b309817b8e03fbd275924cdfd4a0
4
+ data.tar.gz: 0ca21bdac5ecef29e7168f91ef3636ae913d3ec04d9a91ca408685a1f5e4055e
5
5
  SHA512:
6
- metadata.gz: 570e9a80ff7ad75ccc26a4cee3829c2bc3ad88af978213cc97edd5f36917918bb480ee6c97ef7cad014f62d8cffa2c74bbd3113e10b23aa57bd775cbbc07b6f4
7
- data.tar.gz: 75d9c33b5a1a6a2f54b5ee9883bbc78f49134ad925c08a7ea2f7aa5d2229b79b068557dc3943c822476a4f0ab993983a54ecf085d78dd2b58615655094f90656
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"]
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.3.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"
@@ -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", "~> 2.1"
32
- spec.add_dependency "gitt", "~> 3.8"
32
+ spec.add_dependency "gitt", "~> 3.9"
33
33
  spec.add_dependency "infusible", "~> 3.8"
34
34
  spec.add_dependency "refinements", "~> 12.8"
35
35
  spec.add_dependency "runcom", "~> 11.5"
@@ -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.3.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-09-01 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
@@ -127,14 +127,14 @@ dependencies:
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '3.8'
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.8'
137
+ version: '3.9'
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: infusible
140
140
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file