git-lint 8.8.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.adoc +13 -13
  4. data/git-lint.gemspec +13 -13
  5. data/lib/git/lint/analyzer.rb +2 -2
  6. data/lib/git/lint/analyzers/abstract.rb +1 -1
  7. data/lib/git/lint/analyzers/commit_author_capitalization.rb +1 -1
  8. data/lib/git/lint/analyzers/commit_author_email.rb +1 -1
  9. data/lib/git/lint/analyzers/commit_author_name.rb +1 -1
  10. data/lib/git/lint/analyzers/commit_body_word_repeat.rb +1 -1
  11. data/lib/git/lint/analyzers/commit_signature.rb +1 -1
  12. data/lib/git/lint/analyzers/commit_subject_word_repeat.rb +1 -1
  13. data/lib/git/lint/analyzers/commit_trailer_collaborator_capitalization.rb +1 -1
  14. data/lib/git/lint/analyzers/commit_trailer_collaborator_email.rb +1 -1
  15. data/lib/git/lint/analyzers/commit_trailer_collaborator_key.rb +1 -1
  16. data/lib/git/lint/analyzers/commit_trailer_collaborator_name.rb +1 -1
  17. data/lib/git/lint/analyzers/commit_trailer_format_key.rb +1 -1
  18. data/lib/git/lint/analyzers/commit_trailer_format_value.rb +1 -1
  19. data/lib/git/lint/analyzers/commit_trailer_issue_key.rb +1 -1
  20. data/lib/git/lint/analyzers/commit_trailer_issue_value.rb +1 -1
  21. data/lib/git/lint/analyzers/commit_trailer_milestone_key.rb +1 -1
  22. data/lib/git/lint/analyzers/commit_trailer_milestone_value.rb +1 -1
  23. data/lib/git/lint/analyzers/commit_trailer_reviewer_key.rb +1 -1
  24. data/lib/git/lint/analyzers/commit_trailer_reviewer_value.rb +1 -1
  25. data/lib/git/lint/analyzers/commit_trailer_signer_capitalization.rb +1 -1
  26. data/lib/git/lint/analyzers/commit_trailer_signer_email.rb +1 -1
  27. data/lib/git/lint/analyzers/commit_trailer_signer_key.rb +1 -1
  28. data/lib/git/lint/analyzers/commit_trailer_signer_name.rb +1 -1
  29. data/lib/git/lint/analyzers/commit_trailer_tracker_key.rb +1 -1
  30. data/lib/git/lint/analyzers/commit_trailer_tracker_value.rb +1 -1
  31. data/lib/git/lint/cli/actions/analyze/branch.rb +1 -1
  32. data/lib/git/lint/cli/actions/analyze/commit.rb +1 -1
  33. data/lib/git/lint/cli/actions/hook.rb +1 -1
  34. data/lib/git/lint/cli/shell.rb +1 -1
  35. data/lib/git/lint/commits/hosts/circle_ci.rb +1 -1
  36. data/lib/git/lint/commits/hosts/git_hub_action.rb +1 -1
  37. data/lib/git/lint/commits/hosts/local.rb +1 -1
  38. data/lib/git/lint/commits/hosts/netlify_ci.rb +1 -1
  39. data/lib/git/lint/commits/loader.rb +1 -1
  40. data/lib/git/lint/configuration/defaults.yml +1 -1
  41. data/lib/git/lint/{import.rb → dependencies.rb} +1 -1
  42. data/lib/git/lint/reporters/branch.rb +1 -1
  43. data/lib/git/lint/reporters/style.rb +1 -1
  44. data/lib/git/lint/validators/repeated_word.rb +9 -8
  45. data.tar.gz.sig +0 -0
  46. metadata +27 -34
  47. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 32ee770663450a7836c18e512b6e47467d347bacac9693a174b486e5791c4cdf
4
- data.tar.gz: 10fc2241ebc13dd76d1fd51ddb940fd71b6c5e85f1f73cf740bbfb30dbfcd325
3
+ metadata.gz: c9e795b44dd0b5c94a68acf79031dc4bda39b3ad8901734a3e52f9b6442f56fd
4
+ data.tar.gz: c921178b395af033f4bbbfb0be7fa6c0e1a534cf5cd5262e3949fd32e213f4da
5
5
  SHA512:
6
- metadata.gz: 3a4793e3719c75e0d1773f14087e2fd955c79855b30caaf4984831c3bfaa00e57dc1c50489bb13dd90238cd63e6ef85dfb4031ae594c847e257d2ca1e2916ac6
7
- data.tar.gz: 6eef952998db8a5ae86e053553eed8064a77d8216ad306294b5b6d7716cf2d3ab2fdbee4589028684be271af53b162f4fdd4085cade135c1c0166c16311f7f2e
6
+ metadata.gz: b2ffe9cdcc0b0428d34de0ba74c047a7c600ce5b5904346bf0fe7a615a172b7ac45df9972738e7fb9b5bba004d5396ffcc468c7f397cf5a1b613f842cdef8eea
7
+ data.tar.gz: 627b8c26a1673a893b7561191664763e976b3e227b5d9a00d3d23f6a9bd68f209e0d4864dcb5176bea8c1a6e012561c204a95c5d47729c7c4f8c9016e3a4e75d
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -82,7 +82,7 @@ Running Git Lint...
82
82
  83dbad531d84a184e55cbb38c5b2a4e5fa5bcaee (Brooke Kuhlmann, 0 seconds ago): This is a bogus commit message that is also terribly long and will word wrap.
83
83
  Commit Body Presence Warning. Use minimum of 1 line (non-empty).
84
84
  Commit Subject Length Error. Use 72 characters or less.
85
- Commit Subject Prefix Error. Use: /Fixed/, /Added/, /Updated/, /Removed/, /Refactored/.
85
+ Commit Subject Prefix Error. Use: /Added /, /Updated /, /Fixed /, /Removed /, or /Refactored /.
86
86
  Commit Subject Suffix Error. Avoid: /\./, /\?/, /\!/.
87
87
 
88
88
  1 commit inspected. 4 issues detected (1 warning, 3 errors).
@@ -118,20 +118,20 @@ commits:
118
118
  enabled: true
119
119
  severity: error
120
120
  includes:
121
- - "\\-"
122
121
  - "\\*"
122
+ - "\\-"
123
123
  bullet_delimiter:
124
124
  enabled: true
125
125
  severity: error
126
126
  includes:
127
- - "\\-"
128
127
  - "\\*"
128
+ - "\\-"
129
129
  bullet_only:
130
130
  enabled: true
131
131
  severity: error
132
132
  includes:
133
- - "\\-"
134
133
  - "\\*"
134
+ - "\\-"
135
135
  leading_line:
136
136
  enabled: true
137
137
  severity: warn
@@ -182,8 +182,8 @@ commits:
182
182
  enabled: true
183
183
  severity: error
184
184
  excludes:
185
- - "(f|F)ix(es|ed)?\\s\\#\\d+"
186
185
  - "(c|C)lose(s|d)?\\s\\#\\d+"
186
+ - "(f|F)ix(es|ed)?\\s\\#\\d+"
187
187
  - "(r|R)esolve(s|d)?\\s\\#\\d+"
188
188
  word_repeat:
189
189
  enabled: true
@@ -203,18 +203,18 @@ commits:
203
203
  severity: error
204
204
  delimiter: " "
205
205
  includes:
206
- - Fixed
207
206
  - Added
208
207
  - Updated
208
+ - Fixed
209
209
  - Removed
210
210
  - Refactored
211
211
  suffix:
212
212
  enabled: true
213
213
  severity: error
214
214
  excludes:
215
+ - "\\!"
215
216
  - "\\."
216
217
  - "\\?"
217
- - "\\!"
218
218
  word_repeat:
219
219
  enabled: true
220
220
  severity: error
@@ -651,6 +651,12 @@ Automatically ignores _fixup!_ or _squash!_ commit prefixes when calculating sub
651
651
  Ensures each commit subject uses consistent prefixes that explain _what_ is being committed. The
652
652
  `includes` are _case sensitive_ and default to the following prefixes:
653
653
 
654
+ * *Added* - Identifies what was added. The commit should be as small as possible and consist of
655
+ implementation and spec. Otherwise, it might be a change to an existing file which adds new
656
+ behavior.
657
+ * *Updated* - Identifies what was updated. The commit should be as small as possible and _not add
658
+ or fix_ existing behavior. This can sometimes be a grey area but is typically reserved for updates
659
+ to documentation, code comments, dependencies, etc.
654
660
  * *Fixed* - Identifies what was fixed. The commit should be as small as possible and consist of
655
661
  changes to implementation and spec only. In some cases this might be a single line change. The
656
662
  important point is the change is applied to existing code which corrects behavior that wasn't
@@ -658,12 +664,6 @@ Ensures each commit subject uses consistent prefixes that explain _what_ is bein
658
664
  * *Removed* - Identifies what was removed. The commit should be as small as possible and consist
659
665
  only of removed lines/files from the existing implementation. This might also mean breaking
660
666
  changes requiring the publishing of a _major_ version release in the future.
661
- * *Added* - Identifies what was added. The commit should be as small as possible and consist of
662
- implementation and spec. Otherwise, it might be a change to an existing file which adds new
663
- behavior.
664
- * *Updated* - Identifies what was updated. The commit should be as small as possible and _not add
665
- or fix_ existing behavior. This can sometimes be a grey area but is typically reserved for updates
666
- to documentation, code comments, dependencies, etc.
667
667
  * *Refactored* - Identifies what was refactored.
668
668
  link:https://thoughtbot.com/blog/lets-not-misuse-refactoring[_Refactoring is for changing code
669
669
  structure without changing observable behavior_]. The commit should be as small as possible and
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.8.0"
5
+ spec.version = "9.0.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/git-lint"
@@ -22,20 +22,20 @@ 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", "<= 3.4"
26
- spec.add_dependency "cogger", "~> 0.31"
27
- spec.add_dependency "containable", "~> 0.2"
28
- spec.add_dependency "core", "~> 1.10"
25
+ spec.required_ruby_version = "~> 3.4"
26
+ spec.add_dependency "cogger", "~> 1.0"
27
+ spec.add_dependency "containable", "~> 1.0"
28
+ spec.add_dependency "core", "~> 2.0"
29
29
  spec.add_dependency "dry-monads", "~> 1.6"
30
30
  spec.add_dependency "dry-schema", "~> 1.13"
31
- spec.add_dependency "etcher", "~> 2.7"
32
- spec.add_dependency "gitt", "~> 3.12"
33
- spec.add_dependency "infusible", "~> 3.12"
34
- spec.add_dependency "refinements", "~> 12.10"
35
- spec.add_dependency "runcom", "~> 11.10"
36
- spec.add_dependency "sod", "~> 0.20"
37
- spec.add_dependency "spek", "~> 3.0"
38
- spec.add_dependency "tone", "~> 1.10"
31
+ spec.add_dependency "etcher", "~> 3.0"
32
+ spec.add_dependency "gitt", "~> 4.0"
33
+ spec.add_dependency "infusible", "~> 4.0"
34
+ spec.add_dependency "refinements", "~> 13.0"
35
+ spec.add_dependency "runcom", "~> 12.0"
36
+ spec.add_dependency "sod", "~> 1.0"
37
+ spec.add_dependency "spek", "~> 4.0"
38
+ spec.add_dependency "tone", "~> 2.0"
39
39
  spec.add_dependency "zeitwerk", "~> 2.7"
40
40
 
41
41
  spec.bindir = "exe"
@@ -4,7 +4,7 @@ module Git
4
4
  module Lint
5
5
  # Runs all analyzers.
6
6
  class Analyzer
7
- include Import[:settings]
7
+ include Dependencies[:settings]
8
8
 
9
9
  ANALYZERS = [
10
10
  Analyzers::CommitAuthorCapitalization,
@@ -83,7 +83,7 @@ module Git
83
83
  settings.to_h
84
84
  .select { |key, value| key.end_with?("enabled") && value == true }
85
85
  .keys
86
- .map { |key| key.to_s.sub!("commits_", "commit_").delete_suffix! "_enabled" }
86
+ .map { |key| key.to_s.sub("commits_", "commit_").delete_suffix! "_enabled" }
87
87
  end
88
88
 
89
89
  def load_analyzer commit, id
@@ -8,7 +8,7 @@ module Git
8
8
  module Analyzers
9
9
  # An abstract class which provides basic functionality for all analyzers to inherit from.
10
10
  class Abstract
11
- include Import[:settings, :environment]
11
+ include Dependencies[:settings, :environment]
12
12
 
13
13
  using Refinements::String
14
14
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes author name for proper capitalization.
7
7
  class CommitAuthorCapitalization < Abstract
8
- include Import[validator: "validators.capitalization"]
8
+ include Dependencies[validator: "validators.capitalization"]
9
9
 
10
10
  def valid? = validator.call commit.author_name
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes author email address for proper format.
7
7
  class CommitAuthorEmail < Abstract
8
- include Import[validator: "validators.email"]
8
+ include Dependencies[validator: "validators.email"]
9
9
 
10
10
  def valid? = validator.call commit.author_email
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes author name for minimum parts of name.
7
7
  class CommitAuthorName < Abstract
8
- include Import[validator: "validators.name"]
8
+ include Dependencies[validator: "validators.name"]
9
9
 
10
10
  def valid? = validator.call(commit.author_name, minimum:)
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit body for repeated words.
7
7
  class CommitBodyWordRepeat < Abstract
8
- include Import[validator: "validators.repeated_word"]
8
+ include Dependencies[validator: "validators.repeated_word"]
9
9
 
10
10
  def valid? = commit.body_lines.all? { |line| !invalid_line? line }
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit signature validity.
7
7
  class CommitSignature < Abstract
8
- include Import[sanitizer: "sanitizers.signature"]
8
+ include Dependencies[sanitizer: "sanitizers.signature"]
9
9
 
10
10
  def valid?
11
11
  sanitizer.call(commit.signature).match?(/\A#{Regexp.union filter_list}\Z/)
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit subject for repeated words.
7
7
  class CommitSubjectWordRepeat < Abstract
8
- include Import[validator: "validators.repeated_word"]
8
+ include Dependencies[validator: "validators.repeated_word"]
9
9
 
10
10
  def valid? = validator.call(commit.subject).empty?
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer collaborator name capitalization.
7
7
  class CommitTrailerCollaboratorCapitalization < Abstract
8
- include Import[
8
+ include Dependencies[
9
9
  setting: "trailers.collaborator",
10
10
  parser: "parsers.person",
11
11
  validator: "validators.capitalization"
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer collaborator email address format.
7
7
  class CommitTrailerCollaboratorEmail < Abstract
8
- include Import[
8
+ include Dependencies[
9
9
  setting: "trailers.collaborator",
10
10
  parser: "parsers.person",
11
11
  validator: "validators.email"
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer collaborator key usage.
7
7
  class CommitTrailerCollaboratorKey < Abstract
8
- include Import[setting: "trailers.collaborator"]
8
+ include Dependencies[setting: "trailers.collaborator"]
9
9
 
10
10
  def valid? = affected_commit_trailers.empty?
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer collaborator name construction.
7
7
  class CommitTrailerCollaboratorName < Abstract
8
- include Import[
8
+ include Dependencies[
9
9
  setting: "trailers.collaborator",
10
10
  parser: "parsers.person",
11
11
  validator: "validators.name"
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer format key usage.
7
7
  class CommitTrailerFormatKey < Abstract
8
- include Import[setting: "trailers.format"]
8
+ include Dependencies[setting: "trailers.format"]
9
9
 
10
10
  def valid? = affected_commit_trailers.empty?
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer format value.
7
7
  class CommitTrailerFormatValue < Abstract
8
- include Import[setting: "trailers.format"]
8
+ include Dependencies[setting: "trailers.format"]
9
9
 
10
10
  def valid? = affected_commit_trailers.empty?
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer issue key usage.
7
7
  class CommitTrailerIssueKey < Abstract
8
- include Import[setting: "trailers.issue"]
8
+ include Dependencies[setting: "trailers.issue"]
9
9
 
10
10
  def valid? = affected_commit_trailers.empty?
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer issue value.
7
7
  class CommitTrailerIssueValue < Abstract
8
- include Import[setting: "trailers.issue"]
8
+ include Dependencies[setting: "trailers.issue"]
9
9
 
10
10
  def valid? = affected_commit_trailers.empty?
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer milestone key usage.
7
7
  class CommitTrailerMilestoneKey < Abstract
8
- include Import[setting: "trailers.milestone"]
8
+ include Dependencies[setting: "trailers.milestone"]
9
9
 
10
10
  def valid? = affected_commit_trailers.empty?
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer milestone value.
7
7
  class CommitTrailerMilestoneValue < Abstract
8
- include Import[setting: "trailers.milestone"]
8
+ include Dependencies[setting: "trailers.milestone"]
9
9
 
10
10
  def valid? = affected_commit_trailers.empty?
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer reviwer key usage.
7
7
  class CommitTrailerReviewerKey < Abstract
8
- include Import[setting: "trailers.reviewer"]
8
+ include Dependencies[setting: "trailers.reviewer"]
9
9
 
10
10
  def valid? = affected_commit_trailers.empty?
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer reviewer value.
7
7
  class CommitTrailerReviewerValue < Abstract
8
- include Import[setting: "trailers.reviewer"]
8
+ include Dependencies[setting: "trailers.reviewer"]
9
9
 
10
10
  def valid? = affected_commit_trailers.empty?
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer signer name capitalization.
7
7
  class CommitTrailerSignerCapitalization < Abstract
8
- include Import[
8
+ include Dependencies[
9
9
  setting: "trailers.signer",
10
10
  parser: "parsers.person",
11
11
  validator: "validators.capitalization"
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer signer email address format.
7
7
  class CommitTrailerSignerEmail < Abstract
8
- include Import[
8
+ include Dependencies[
9
9
  setting: "trailers.signer",
10
10
  parser: "parsers.person",
11
11
  validator: "validators.email"
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer signer key usage.
7
7
  class CommitTrailerSignerKey < Abstract
8
- include Import[setting: "trailers.signer"]
8
+ include Dependencies[setting: "trailers.signer"]
9
9
 
10
10
  def valid? = affected_commit_trailers.empty?
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer signer name construction.
7
7
  class CommitTrailerSignerName < Abstract
8
- include Import[
8
+ include Dependencies[
9
9
  setting: "trailers.signer",
10
10
  parser: "parsers.person",
11
11
  validator: "validators.name"
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer tracker key usage.
7
7
  class CommitTrailerTrackerKey < Abstract
8
- include Import[setting: "trailers.tracker"]
8
+ include Dependencies[setting: "trailers.tracker"]
9
9
 
10
10
  def valid? = affected_commit_trailers.empty?
11
11
 
@@ -5,7 +5,7 @@ module Git
5
5
  module Analyzers
6
6
  # Analyzes commit trailer tracker value.
7
7
  class CommitTrailerTrackerValue < Abstract
8
- include Import[setting: "trailers.tracker"]
8
+ include Dependencies[setting: "trailers.tracker"]
9
9
 
10
10
  def valid? = affected_commit_trailers.empty?
11
11
 
@@ -9,7 +9,7 @@ module Git
9
9
  module Analyze
10
10
  # Handles analyze action for branch.
11
11
  class Branch < Sod::Action
12
- include Git::Lint::Import[:logger, :kernel, :io]
12
+ include Dependencies[:logger, :kernel, :io]
13
13
 
14
14
  description "Analyze current branch."
15
15
 
@@ -9,7 +9,7 @@ module Git
9
9
  module Analyze
10
10
  # Handles analyze action for single commit SHA
11
11
  class Commit < Sod::Action
12
- include Git::Lint::Import[:git, :logger, :kernel, :io]
12
+ include Dependencies[:git, :logger, :kernel, :io]
13
13
 
14
14
  description "Analyze specific commits."
15
15
 
@@ -9,7 +9,7 @@ module Git
9
9
  module Actions
10
10
  # Handles unsaved Git commit action.
11
11
  class Hook < Sod::Action
12
- include Git::Lint::Import[:git, :logger, :kernel, :io]
12
+ include Dependencies[:git, :logger, :kernel, :io]
13
13
 
14
14
  description "Hook for analyzing unsaved commits."
15
15
 
@@ -7,7 +7,7 @@ module Git
7
7
  module CLI
8
8
  # The main Command Line Interface (CLI) object.
9
9
  class Shell
10
- include Import[:defaults_path, :xdg_config, :specification]
10
+ include Dependencies[:defaults_path, :xdg_config, :specification]
11
11
 
12
12
  def initialize(context: Sod::Context, dsl: Sod, **)
13
13
  super(**)
@@ -6,7 +6,7 @@ module Git
6
6
  module Hosts
7
7
  # Provides Circle CI feature branch information.
8
8
  class CircleCI
9
- include Git::Lint::Import[:git]
9
+ include Dependencies[:git]
10
10
 
11
11
  def call = git.commits "origin/#{branch_default}..#{branch_name}"
12
12
 
@@ -6,7 +6,7 @@ module Git
6
6
  module Hosts
7
7
  # Provides GitHub Action feature branch information.
8
8
  class GitHubAction
9
- include Git::Lint::Import[:git]
9
+ include Dependencies[:git]
10
10
 
11
11
  def call = git.commits "origin/#{branch_default}..#{branch_name}"
12
12
 
@@ -6,7 +6,7 @@ module Git
6
6
  module Hosts
7
7
  # Provides local feature branch information.
8
8
  class Local
9
- include Git::Lint::Import[:git]
9
+ include Dependencies[:git]
10
10
 
11
11
  def call = git.commits "#{branch_default}..#{branch_name}"
12
12
 
@@ -6,7 +6,7 @@ module Git
6
6
  module Hosts
7
7
  # Provides Netlify CI feature branch information.
8
8
  class NetlifyCI
9
- include Git::Lint::Import[:git, :environment]
9
+ include Dependencies[:git, :environment]
10
10
 
11
11
  def call
12
12
  git.call("remote", "add", "-f", "origin", environment["REPOSITORY_URL"])
@@ -7,7 +7,7 @@ module Git
7
7
  module Commits
8
8
  # Automatically detects and loads host.
9
9
  class Loader
10
- include Import[
10
+ include Dependencies[
11
11
  :git,
12
12
  :environment,
13
13
  circle_ci: "hosts.circle_ci",
@@ -100,9 +100,9 @@ commits:
100
100
  severity: error
101
101
  delimiter: " "
102
102
  includes:
103
- - Fixed
104
103
  - Added
105
104
  - Updated
105
+ - Fixed
106
106
  - Removed
107
107
  - Refactored
108
108
  suffix:
@@ -4,6 +4,6 @@ require "infusible"
4
4
 
5
5
  module Git
6
6
  module Lint
7
- Import = Infusible[Container]
7
+ Dependencies = Infusible[Container]
8
8
  end
9
9
  end
@@ -5,7 +5,7 @@ module Git
5
5
  module Reporters
6
6
  # Reports issues related to a single branch.
7
7
  class Branch
8
- include Import[:color]
8
+ include Dependencies[:color]
9
9
  using Refinements::String
10
10
 
11
11
  def initialize(collector: Collector.new, **)
@@ -5,7 +5,7 @@ module Git
5
5
  module Reporters
6
6
  # Reports issues related to a single style.
7
7
  class Style
8
- include Import[:color]
8
+ include Dependencies[:color]
9
9
 
10
10
  def initialize(analyzer, **)
11
11
  super(**)
@@ -15,8 +15,13 @@ module Git
15
15
  | # Or.
16
16
  (?<=\s)\w+ # Match word with leading space.
17
17
  /x,
18
- code_block: /`.+`/,
19
- version: /\d+\./
18
+ exclude: /
19
+ ( # Conditional start.
20
+ `.+` # Code blocks.
21
+ | # Or.
22
+ \d+\. # Digits followed by periods.
23
+ ) # Conditional end.
24
+ /x
20
25
  }.freeze
21
26
 
22
27
  def initialize patterns: PATTERNS
@@ -35,15 +40,11 @@ module Git
35
40
  end
36
41
  end
37
42
 
38
- def parse content
39
- content.gsub(code_block_pattern, "").gsub(version_pattern, "").scan word_pattern
40
- end
43
+ def parse(content) = content.gsub(exclude_pattern, "").scan word_pattern
41
44
 
42
45
  def word_pattern = patterns.fetch :word
43
46
 
44
- def code_block_pattern = patterns.fetch :code_block
45
-
46
- def version_pattern = patterns.fetch :version
47
+ def exclude_pattern = patterns.fetch :exclude
47
48
  end
48
49
  end
49
50
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.8.0
4
+ version: 9.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain:
11
10
  - |
@@ -35,7 +34,7 @@ cert_chain:
35
34
  3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
36
35
  gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
37
36
  -----END CERTIFICATE-----
38
- date: 2024-11-09 00:00:00.000000000 Z
37
+ date: 2024-12-27 00:00:00.000000000 Z
39
38
  dependencies:
40
39
  - !ruby/object:Gem::Dependency
41
40
  name: cogger
@@ -43,42 +42,42 @@ dependencies:
43
42
  requirements:
44
43
  - - "~>"
45
44
  - !ruby/object:Gem::Version
46
- version: '0.31'
45
+ version: '1.0'
47
46
  type: :runtime
48
47
  prerelease: false
49
48
  version_requirements: !ruby/object:Gem::Requirement
50
49
  requirements:
51
50
  - - "~>"
52
51
  - !ruby/object:Gem::Version
53
- version: '0.31'
52
+ version: '1.0'
54
53
  - !ruby/object:Gem::Dependency
55
54
  name: containable
56
55
  requirement: !ruby/object:Gem::Requirement
57
56
  requirements:
58
57
  - - "~>"
59
58
  - !ruby/object:Gem::Version
60
- version: '0.2'
59
+ version: '1.0'
61
60
  type: :runtime
62
61
  prerelease: false
63
62
  version_requirements: !ruby/object:Gem::Requirement
64
63
  requirements:
65
64
  - - "~>"
66
65
  - !ruby/object:Gem::Version
67
- version: '0.2'
66
+ version: '1.0'
68
67
  - !ruby/object:Gem::Dependency
69
68
  name: core
70
69
  requirement: !ruby/object:Gem::Requirement
71
70
  requirements:
72
71
  - - "~>"
73
72
  - !ruby/object:Gem::Version
74
- version: '1.10'
73
+ version: '2.0'
75
74
  type: :runtime
76
75
  prerelease: false
77
76
  version_requirements: !ruby/object:Gem::Requirement
78
77
  requirements:
79
78
  - - "~>"
80
79
  - !ruby/object:Gem::Version
81
- version: '1.10'
80
+ version: '2.0'
82
81
  - !ruby/object:Gem::Dependency
83
82
  name: dry-monads
84
83
  requirement: !ruby/object:Gem::Requirement
@@ -113,112 +112,112 @@ dependencies:
113
112
  requirements:
114
113
  - - "~>"
115
114
  - !ruby/object:Gem::Version
116
- version: '2.7'
115
+ version: '3.0'
117
116
  type: :runtime
118
117
  prerelease: false
119
118
  version_requirements: !ruby/object:Gem::Requirement
120
119
  requirements:
121
120
  - - "~>"
122
121
  - !ruby/object:Gem::Version
123
- version: '2.7'
122
+ version: '3.0'
124
123
  - !ruby/object:Gem::Dependency
125
124
  name: gitt
126
125
  requirement: !ruby/object:Gem::Requirement
127
126
  requirements:
128
127
  - - "~>"
129
128
  - !ruby/object:Gem::Version
130
- version: '3.12'
129
+ version: '4.0'
131
130
  type: :runtime
132
131
  prerelease: false
133
132
  version_requirements: !ruby/object:Gem::Requirement
134
133
  requirements:
135
134
  - - "~>"
136
135
  - !ruby/object:Gem::Version
137
- version: '3.12'
136
+ version: '4.0'
138
137
  - !ruby/object:Gem::Dependency
139
138
  name: infusible
140
139
  requirement: !ruby/object:Gem::Requirement
141
140
  requirements:
142
141
  - - "~>"
143
142
  - !ruby/object:Gem::Version
144
- version: '3.12'
143
+ version: '4.0'
145
144
  type: :runtime
146
145
  prerelease: false
147
146
  version_requirements: !ruby/object:Gem::Requirement
148
147
  requirements:
149
148
  - - "~>"
150
149
  - !ruby/object:Gem::Version
151
- version: '3.12'
150
+ version: '4.0'
152
151
  - !ruby/object:Gem::Dependency
153
152
  name: refinements
154
153
  requirement: !ruby/object:Gem::Requirement
155
154
  requirements:
156
155
  - - "~>"
157
156
  - !ruby/object:Gem::Version
158
- version: '12.10'
157
+ version: '13.0'
159
158
  type: :runtime
160
159
  prerelease: false
161
160
  version_requirements: !ruby/object:Gem::Requirement
162
161
  requirements:
163
162
  - - "~>"
164
163
  - !ruby/object:Gem::Version
165
- version: '12.10'
164
+ version: '13.0'
166
165
  - !ruby/object:Gem::Dependency
167
166
  name: runcom
168
167
  requirement: !ruby/object:Gem::Requirement
169
168
  requirements:
170
169
  - - "~>"
171
170
  - !ruby/object:Gem::Version
172
- version: '11.10'
171
+ version: '12.0'
173
172
  type: :runtime
174
173
  prerelease: false
175
174
  version_requirements: !ruby/object:Gem::Requirement
176
175
  requirements:
177
176
  - - "~>"
178
177
  - !ruby/object:Gem::Version
179
- version: '11.10'
178
+ version: '12.0'
180
179
  - !ruby/object:Gem::Dependency
181
180
  name: sod
182
181
  requirement: !ruby/object:Gem::Requirement
183
182
  requirements:
184
183
  - - "~>"
185
184
  - !ruby/object:Gem::Version
186
- version: '0.20'
185
+ version: '1.0'
187
186
  type: :runtime
188
187
  prerelease: false
189
188
  version_requirements: !ruby/object:Gem::Requirement
190
189
  requirements:
191
190
  - - "~>"
192
191
  - !ruby/object:Gem::Version
193
- version: '0.20'
192
+ version: '1.0'
194
193
  - !ruby/object:Gem::Dependency
195
194
  name: spek
196
195
  requirement: !ruby/object:Gem::Requirement
197
196
  requirements:
198
197
  - - "~>"
199
198
  - !ruby/object:Gem::Version
200
- version: '3.0'
199
+ version: '4.0'
201
200
  type: :runtime
202
201
  prerelease: false
203
202
  version_requirements: !ruby/object:Gem::Requirement
204
203
  requirements:
205
204
  - - "~>"
206
205
  - !ruby/object:Gem::Version
207
- version: '3.0'
206
+ version: '4.0'
208
207
  - !ruby/object:Gem::Dependency
209
208
  name: tone
210
209
  requirement: !ruby/object:Gem::Requirement
211
210
  requirements:
212
211
  - - "~>"
213
212
  - !ruby/object:Gem::Version
214
- version: '1.10'
213
+ version: '2.0'
215
214
  type: :runtime
216
215
  prerelease: false
217
216
  version_requirements: !ruby/object:Gem::Requirement
218
217
  requirements:
219
218
  - - "~>"
220
219
  - !ruby/object:Gem::Version
221
- version: '1.10'
220
+ version: '2.0'
222
221
  - !ruby/object:Gem::Dependency
223
222
  name: zeitwerk
224
223
  requirement: !ruby/object:Gem::Requirement
@@ -233,7 +232,6 @@ dependencies:
233
232
  - - "~>"
234
233
  - !ruby/object:Gem::Version
235
234
  version: '2.7'
236
- description:
237
235
  email:
238
236
  - brooke@alchemists.io
239
237
  executables:
@@ -303,10 +301,10 @@ files:
303
301
  - lib/git/lint/configuration/model.rb
304
302
  - lib/git/lint/configuration/trailer.rb
305
303
  - lib/git/lint/container.rb
304
+ - lib/git/lint/dependencies.rb
306
305
  - lib/git/lint/errors/base.rb
307
306
  - lib/git/lint/errors/severity.rb
308
307
  - lib/git/lint/errors/sha.rb
309
- - lib/git/lint/import.rb
310
308
  - lib/git/lint/kit/filter_list.rb
311
309
  - lib/git/lint/rake/register.rb
312
310
  - lib/git/lint/reporters/branch.rb
@@ -330,16 +328,12 @@ metadata:
330
328
  label: Git Lint
331
329
  rubygems_mfa_required: 'true'
332
330
  source_code_uri: https://github.com/bkuhlmann/git-lint
333
- post_install_message:
334
331
  rdoc_options: []
335
332
  require_paths:
336
333
  - lib
337
334
  required_ruby_version: !ruby/object:Gem::Requirement
338
335
  requirements:
339
- - - ">="
340
- - !ruby/object:Gem::Version
341
- version: '3.3'
342
- - - "<="
336
+ - - "~>"
343
337
  - !ruby/object:Gem::Version
344
338
  version: '3.4'
345
339
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -348,8 +342,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
348
342
  - !ruby/object:Gem::Version
349
343
  version: '0'
350
344
  requirements: []
351
- rubygems_version: 3.5.23
352
- signing_key:
345
+ rubygems_version: 3.6.2
353
346
  specification_version: 4
354
347
  summary: A command line interface for linting Git commits.
355
348
  test_files: []
metadata.gz.sig CHANGED
Binary file