git-lint 5.3.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.adoc +195 -137
  4. data/git-lint.gemspec +12 -9
  5. data/lib/git/lint/analyzer.rb +9 -11
  6. data/lib/git/lint/analyzers/abstract.rb +6 -11
  7. data/lib/git/lint/analyzers/commit_author_name.rb +1 -1
  8. data/lib/git/lint/analyzers/commit_body_bullet.rb +3 -1
  9. data/lib/git/lint/analyzers/commit_body_bullet_capitalization.rb +3 -1
  10. data/lib/git/lint/analyzers/commit_body_bullet_delimiter.rb +3 -1
  11. data/lib/git/lint/analyzers/commit_body_line_length.rb +1 -1
  12. data/lib/git/lint/analyzers/commit_body_phrase.rb +3 -1
  13. data/lib/git/lint/analyzers/commit_body_presence.rb +1 -1
  14. data/lib/git/lint/analyzers/commit_body_single_bullet.rb +3 -1
  15. data/lib/git/lint/analyzers/commit_body_tracker_shorthand.rb +3 -1
  16. data/lib/git/lint/analyzers/commit_signature.rb +3 -1
  17. data/lib/git/lint/analyzers/commit_subject_length.rb +1 -1
  18. data/lib/git/lint/analyzers/commit_subject_prefix.rb +5 -3
  19. data/lib/git/lint/analyzers/commit_subject_suffix.rb +3 -1
  20. data/lib/git/lint/analyzers/commit_trailer_collaborator_key.rb +3 -1
  21. data/lib/git/lint/analyzers/commit_trailer_collaborator_name.rb +1 -1
  22. data/lib/git/lint/analyzers/commit_trailer_format_key.rb +3 -1
  23. data/lib/git/lint/analyzers/commit_trailer_format_value.rb +3 -1
  24. data/lib/git/lint/analyzers/commit_trailer_issue_key.rb +3 -1
  25. data/lib/git/lint/analyzers/commit_trailer_issue_value.rb +3 -1
  26. data/lib/git/lint/analyzers/commit_trailer_signer_key.rb +3 -1
  27. data/lib/git/lint/analyzers/commit_trailer_signer_name.rb +1 -1
  28. data/lib/git/lint/analyzers/commit_trailer_tracker_key.rb +3 -1
  29. data/lib/git/lint/analyzers/commit_trailer_tracker_value.rb +3 -1
  30. data/lib/git/lint/cli/actions/analyze/branch.rb +8 -2
  31. data/lib/git/lint/cli/actions/analyze/commit.rb +7 -1
  32. data/lib/git/lint/cli/actions/hook.rb +8 -1
  33. data/lib/git/lint/cli/shell.rb +26 -27
  34. data/lib/git/lint/configuration/contract.rb +103 -0
  35. data/lib/git/lint/configuration/defaults.yml +177 -162
  36. data/lib/git/lint/configuration/model.rb +97 -0
  37. data/lib/git/lint/container.rb +16 -2
  38. data/lib/git/lint/rake/register.rb +1 -1
  39. data/lib/git/lint/reporters/style.rb +4 -4
  40. data.tar.gz.sig +0 -0
  41. metadata +62 -27
  42. metadata.gz.sig +0 -0
  43. data/lib/git/lint/cli/actions/config.rb +0 -35
  44. data/lib/git/lint/cli/actions/container.rb +0 -23
  45. data/lib/git/lint/cli/actions/import.rb +0 -13
  46. data/lib/git/lint/cli/parser.rb +0 -37
  47. data/lib/git/lint/cli/parsers/analyze.rb +0 -41
  48. data/lib/git/lint/cli/parsers/core.rb +0 -76
  49. data/lib/git/lint/configuration/content.rb +0 -26
  50. data/lib/git/lint/configuration/loader.rb +0 -50
  51. data/lib/git/lint/configuration/setting.rb +0 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dec89d39077ba90de61852f02683c825317508ae92b3b37ff06410fc6df92667
4
- data.tar.gz: e1fba8f0d419ef6f7d1d6d4545825e550fd767caea8f2e990aa8e93a20974c10
3
+ metadata.gz: 5ffca289e0b59fadd72f484cacf157edd85858593f8c8c100f14c4fea847c81f
4
+ data.tar.gz: 262ecb9b537ca4e748f39ae2a1d5a874bdbf6bb2d944301a5de4d1eab8198866
5
5
  SHA512:
6
- metadata.gz: 31540aa9c7a028e77e8a6732530e6f9b1d5754bf319226af5b5131e0f5e1b2ee3a5f66656bb894891a65069ac35e6b226c497a27d63162a82488b15c897f3f82
7
- data.tar.gz: 7195cbfe2c6d4eb96491038952e5cff9de6c9c5df89f3bcce1c78ae3236685c32a338da2ec61aa0234a08146513699871e7dcbddbd074f319bdd814a94b73f0c
6
+ metadata.gz: d4e25d238b757637080e02a784a3d2df421fbf52633ca9f933e48bc2f7b8cd4f7d2e96c1c0acc190184bb058fa90d8e9984d131e0bd00cd55de4cfadfbba4298
7
+ data.tar.gz: b5a690ba1f82862963bb6c45de94933f514a94dc3f01fd2e439dc024f8383a74fb8d65824519bb06da997fa181c01dee1c6013b9f29600666d035cb2d6d0c8dd
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -53,19 +53,22 @@ gem install git-lint
53
53
  From the command line, type: `git-lint --help`
54
54
 
55
55
  ....
56
- USAGE:
57
- -a, --analyze [options] Analyze current branch commits.
58
- -c, --config ACTION Manage gem configuration. Actions: edit or view.
59
- -h, --help Show this message.
60
- --hook PATH Hook for analyzing unsaved commits.
61
- -v, --version Show gem version.
62
-
63
- ANALYZE OPTIONS:
64
- --sha HASH Analyze specific commit SHA.
56
+ USAGE
57
+ git-lint [OPTIONS]
58
+ git-lint COMMAND [OPTIONS]
59
+
60
+ OPTIONS
61
+ --hook PATH Hook for analyzing unsaved commits.
62
+ -v, --version Show version.
63
+ -h, --help [COMMAND] Show this message.
64
+
65
+ COMMANDS
66
+ config Manage configuration.
67
+ Path is dynamic per current directory.
68
+ analyze Analyze branch or commit(s).
65
69
  ....
66
70
 
67
- To check if your Git commit history is clean, run: `git-lint --analyze`. It will exit with a failure
68
- if at least one issue with error severity is detected.
71
+ To check if your Git commit history is clean, run: `git-lint analyze --branch`. It will exit with a failure if at least one issue with error severity is detected.
69
72
 
70
73
  This gem does not check commits on your default branch (i.e. `main`). This is intentional as you
71
74
  would, generally, not want to rewrite or fix commits on the `main` branch. This gem is best used on
@@ -80,7 +83,7 @@ git checkout -b test
80
83
  touch text.txt
81
84
  git add --all .
82
85
  git commit --message "This is a bogus commit message that is also terribly long and will word wrap"
83
- git-lint --analyze
86
+ git-lint analyze --branch
84
87
  ----
85
88
 
86
89
  Output:
@@ -110,130 +113,185 @@ variables. The default configuration is:
110
113
 
111
114
  [source,yaml]
112
115
  ----
113
- :analyzers:
114
- :commit_author_capitalization:
115
- :enabled: true
116
- :severity: :error
117
- :commit_author_email:
118
- :enabled: true
119
- :severity: :error
120
- :commit_author_name:
121
- :enabled: true
122
- :severity: :error
123
- :minimum: 2
124
- :commit_body_bullet:
125
- :enabled: true
126
- :severity: :error
127
- :excludes:
128
- - "\\*"
129
- - "•"
130
- :commit_body_bullet_capitalization:
131
- :enabled: true
132
- :severity: :error
133
- :includes: "\\-"
134
- :commit_body_bullet_delimiter:
135
- :enabled: true
136
- :severity: :error
137
- :includes: "\\-"
138
- :commit_body_tracker_shorthand:
139
- :enabled: true
140
- :severity: :error
141
- :excludes:
142
- - "(f|F)ix(es|ed)?\\s\\#\\d+"
143
- - "(c|C)lose(s|d)?\\s\\#\\d+"
144
- - "(r|R)esolve(s|d)?\\s\\#\\d+"
145
- :commit_body_leading_line:
146
- :enabled: false
147
- :severity: :warn
148
- :commit_body_line_length:
149
- :enabled: true
150
- :severity: :error
151
- :maximum: 72
152
- :commit_body_paragraph_capitalization:
153
- :enabled: true
154
- :severity: :error
155
- :commit_body_phrase:
156
- :enabled: true
157
- :severity: :error
158
- :excludes:
159
- - "absolutely"
160
- - "actually"
161
- - "all intents and purposes"
162
- - "along the lines"
163
- - "at this moment in time"
164
- - "basically"
165
- - "each and every one"
166
- - "everyone knows"
167
- - "fact of the matter"
168
- - "furthermore"
169
- - "however"
170
- - "in due course"
171
- - "in the end"
172
- - "last but not least"
173
- - "matter of fact"
174
- - "obviously"
175
- - "of course"
176
- - "really"
177
- - "simply"
178
- - "things being equal"
179
- - "would like to"
180
- - "\\beasy\\b"
181
- - "\\bjust\\b"
182
- - "\\bquite\\b"
183
- - "as\\sfar\\sas\\s.+\\sconcerned"
184
- - "of\\sthe\\s(fact|opinion)\\sthat"
185
- :commit_body_presence:
186
- :enabled: false
187
- :severity: :warn
188
- :minimum: 1
189
- :commit_body_single_bullet:
190
- :enabled: true
191
- :severity: :error
192
- :includes: "\\-"
193
- :commit_subject_length:
194
- :enabled: true
195
- :severity: :error
196
- :maximum: 72
197
- :commit_subject_prefix:
198
- :enabled: true
199
- :severity: :error
200
- :delimiter: " "
201
- :includes:
202
- - Fixed
203
- - Added
204
- - Updated
205
- - Removed
206
- - Refactored
207
- :commit_subject_suffix:
208
- :enabled: true
209
- :severity: :error
210
- :excludes:
211
- - "\\."
212
- - "\\?"
213
- - "\\!"
214
- :commit_trailer_collaborator_capitalization:
215
- :enabled: true
216
- :severity: :error
217
- :commit_trailer_collaborator_duplication:
218
- :enabled: true
219
- :severity: :error
220
- :commit_trailer_collaborator_email:
221
- :enabled: true
222
- :severity: :error
223
- :commit_trailer_collaborator_key:
224
- :enabled: true
225
- :severity: :error
226
- :includes:
227
- - "Co-Authored-By"
228
- :commit_trailer_collaborator_name:
229
- :enabled: true
230
- :severity: :error
231
- :minimum: 2
116
+ commits:
117
+ author:
118
+ capitalization:
119
+ enabled: true
120
+ severity: error
121
+ email:
122
+ enabled: true
123
+ severity: error
124
+ name:
125
+ enabled: true
126
+ severity: error
127
+ minimum: 2
128
+ body:
129
+ bullet:
130
+ enabled: true
131
+ severity: error
132
+ excludes:
133
+ - "\\*"
134
+ - "•"
135
+ bullet_capitalization:
136
+ enabled: true
137
+ severity: error
138
+ includes:
139
+ - "\\-"
140
+ bullet_delimiter:
141
+ enabled: true
142
+ severity: error
143
+ includes:
144
+ - "\\-"
145
+ leading_line:
146
+ enabled: true
147
+ severity: warn
148
+ line_length:
149
+ enabled: false
150
+ severity: error
151
+ maximum: 72
152
+ paragraph_capitalization:
153
+ enabled: true
154
+ severity: error
155
+ phrase:
156
+ enabled: true
157
+ severity: error
158
+ excludes:
159
+ - "absolutely"
160
+ - "actually"
161
+ - "all intents and purposes"
162
+ - "along the lines"
163
+ - "at this moment in time"
164
+ - "basically"
165
+ - "each and every one"
166
+ - "everyone knows"
167
+ - "fact of the matter"
168
+ - "furthermore"
169
+ - "however"
170
+ - "in due course"
171
+ - "in the end"
172
+ - "last but not least"
173
+ - "matter of fact"
174
+ - "obviously"
175
+ - "of course"
176
+ - "really"
177
+ - "simply"
178
+ - "things being equal"
179
+ - "would like to"
180
+ - "\\beasy\\b"
181
+ - "\\bjust\\b"
182
+ - "\\bquite\\b"
183
+ - "as\\sfar\\sas\\s.+\\sconcerned"
184
+ - "of\\sthe\\s(fact|opinion)\\sthat"
185
+ presence:
186
+ enabled: true
187
+ severity: warn
188
+ minimum: 1
189
+ single_bullet:
190
+ enabled: true
191
+ severity: error
192
+ includes:
193
+ - "\\-"
194
+ tracker_shorthand:
195
+ enabled: true
196
+ severity: error
197
+ excludes:
198
+ - "(f|F)ix(es|ed)?\\s\\#\\d+"
199
+ - "(c|C)lose(s|d)?\\s\\#\\d+"
200
+ - "(r|R)esolve(s|d)?\\s\\#\\d+"
201
+ signature:
202
+ enabled: false
203
+ severity: error
204
+ includes:
205
+ - Good
206
+ subject:
207
+ length:
208
+ enabled: true
209
+ severity: error
210
+ maximum: 72
211
+ prefix:
212
+ enabled: true
213
+ severity: error
214
+ delimiter: " "
215
+ includes:
216
+ - Fixed
217
+ - Added
218
+ - Updated
219
+ - Removed
220
+ - Refactored
221
+ suffix:
222
+ enabled: true
223
+ severity: error
224
+ excludes:
225
+ - "\\."
226
+ - "\\?"
227
+ - "\\!"
228
+ trailer:
229
+ collaborator_capitalization:
230
+ enabled: true
231
+ severity: error
232
+ collaborator_email:
233
+ enabled: true
234
+ severity: error
235
+ collaborator_key:
236
+ enabled: true
237
+ severity: error
238
+ includes:
239
+ - Co-Authored-By
240
+ collaborator_name:
241
+ enabled: true
242
+ severity: error
243
+ minimum: 2
244
+ duplicate:
245
+ enabled: true
246
+ severity: error
247
+ format_key:
248
+ enabled: true
249
+ severity: error
250
+ includes:
251
+ - Format
252
+ format_value:
253
+ enabled: true
254
+ severity: error
255
+ includes:
256
+ - ASCII
257
+ - Markdown
258
+ issue_key:
259
+ enabled: true
260
+ severity: error
261
+ includes:
262
+ - Issue
263
+ issue_value:
264
+ enabled: true
265
+ severity: error
266
+ includes:
267
+ - "[\\w-]+"
268
+ signer_capitalization:
269
+ enabled: true
270
+ severity: error
271
+ signer_email:
272
+ enabled: true
273
+ severity: error
274
+ signer_key:
275
+ enabled: true
276
+ severity: error
277
+ includes:
278
+ - Signed-By
279
+ signer_name:
280
+ enabled: true
281
+ severity: error
282
+ minimum: 2
283
+ tracker_key:
284
+ enabled: true
285
+ severity: error
286
+ includes:
287
+ - Tracker
288
+ tracker_value:
289
+ enabled: true
290
+ severity: error
291
+ includes:
292
+ - "[\\w\\-\\s]+"
232
293
  ----
233
294
 
234
- Feel free to take this default configuration, modify, and save as your own custom
235
- `configuration.yml`.
236
-
237
295
  ==== Enablement
238
296
 
239
297
  By default, most analyzers are enabled. Accepted values are `true` or `false`. If you wish to
@@ -965,11 +1023,11 @@ Whenever you attempt to add a commit, Git Lint will check your commit for issues
965
1023
 
966
1024
  ===== Post Commit
967
1025
 
968
- The _post-commit_ hook is possible via the `--analyze` command. Usage:
1026
+ The _post-commit_ hook is possible via the `analyze` command. Usage:
969
1027
 
970
1028
  [source,bash]
971
1029
  ----
972
- git-lint --analyze --shas SHA
1030
+ git-lint analyze --commit SHA
973
1031
  ----
974
1032
 
975
1033
  The _post-commit_ hook can be used multiple ways but, generally, you'll want to check the last
@@ -989,7 +1047,7 @@ if ! command -v git-lint > /dev/null; then
989
1047
  exit 1
990
1048
  fi
991
1049
 
992
- git-lint --analyze --shas $(git log --pretty=format:%H -1)
1050
+ git-lint analyze --commit $(git log --pretty=format:%H -1)
993
1051
  ----
994
1052
 
995
1053
  Whenever a commit has been saved, this script will run Git Lint to check for issues.
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 = "5.3.0"
5
+ spec.version = "6.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"
@@ -23,16 +23,19 @@ Gem::Specification.new do |spec|
23
23
  spec.cert_chain = [Gem.default_cert_path]
24
24
 
25
25
  spec.required_ruby_version = "~> 3.2"
26
- spec.add_dependency "cogger", "~> 0.8"
27
- spec.add_dependency "core", "~> 0.1.0"
26
+ spec.add_dependency "cogger", "~> 0.10"
27
+ spec.add_dependency "core", "~> 0.1"
28
28
  spec.add_dependency "dry-container", "~> 0.11"
29
29
  spec.add_dependency "dry-monads", "~> 1.6"
30
- spec.add_dependency "gitt", "~> 1.1"
31
- spec.add_dependency "infusible", "~> 1.0"
32
- spec.add_dependency "refinements", "~> 10.0"
33
- spec.add_dependency "runcom", "~> 9.0"
34
- spec.add_dependency "spek", "~> 1.0"
35
- spec.add_dependency "tone", "~> 0.1"
30
+ spec.add_dependency "dry-schema", "~> 1.13"
31
+ spec.add_dependency "etcher", "~> 0.2"
32
+ spec.add_dependency "gitt", "~> 2.0"
33
+ spec.add_dependency "infusible", "~> 2.0"
34
+ spec.add_dependency "refinements", "~> 11.0"
35
+ spec.add_dependency "runcom", "~> 10.0"
36
+ spec.add_dependency "sod", "~> 0.0"
37
+ spec.add_dependency "spek", "~> 2.0"
38
+ spec.add_dependency "tone", "~> 0.3"
36
39
  spec.add_dependency "zeitwerk", "~> 2.6"
37
40
 
38
41
  spec.bindir = "exe"
@@ -72,22 +72,20 @@ module Git
72
72
  commits.value_or([]).map { |commit| analyze commit }
73
73
  end
74
74
 
75
- def analyze commit
76
- settings.map { |setting| load_analyzer commit, setting.id }
77
- .select(&:enabled?)
78
- .map { |analyzer| collector.add analyzer }
75
+ def analyze(commit) = enabled.map { |id| collector.add load_analyzer(commit, id) }
76
+
77
+ # :reek:FeatureEnvy
78
+ def enabled
79
+ configuration.to_h
80
+ .select { |key, value| key.end_with?("enabled") && value == true }
81
+ .keys
82
+ .map { |key| key.to_s.sub!("commits_", "commit_").delete_suffix! "_enabled" }
79
83
  end
80
84
 
81
85
  def load_analyzer commit, id
82
86
  analyzers.find { |analyzer| analyzer.id == id }
83
- .then do |analyzer|
84
- fail Errors::Base, "Invalid analyzer detected: #{id}." unless analyzer
85
-
86
- analyzer.new commit
87
- end
87
+ .then { |analyzer| analyzer.new commit }
88
88
  end
89
-
90
- def settings = configuration.analyzers
91
89
  end
92
90
  end
93
91
  end
@@ -12,10 +12,10 @@ module Git
12
12
 
13
13
  using ::Refinements::Strings
14
14
 
15
- LEVELS = %i[warn error].freeze
15
+ LEVELS = %w[warn error].freeze
16
16
  BODY_OFFSET = 3
17
17
 
18
- def self.id = to_s.delete_prefix("Git::Lint::Analyzers").snakecase.to_sym
18
+ def self.id = to_s.delete_prefix!("Git::Lint::Analyzers").snakecase
19
19
 
20
20
  def self.label = to_s.delete_prefix("Git::Lint::Analyzers").titleize
21
21
 
@@ -29,12 +29,9 @@ module Git
29
29
  @filter_list = load_filter_list
30
30
  end
31
31
 
32
- def enabled? = settings.enabled
33
-
34
32
  def severity
35
- settings.severity.tap do |level|
36
- fail Errors::Severity, level unless LEVELS.include? level
37
- end
33
+ configuration.public_send("#{self.class.id}_severity".sub("commit_", "commits_"))
34
+ .tap { |level| fail Errors::Severity, level unless LEVELS.include? level }
38
35
  end
39
36
 
40
37
  def valid?
@@ -43,9 +40,9 @@ module Git
43
40
 
44
41
  def invalid? = !valid?
45
42
 
46
- def warning? = invalid? && severity == :warn
43
+ def warning? = invalid? && severity == "warn"
47
44
 
48
- def error? = invalid? && severity == :error
45
+ def error? = invalid? && severity == "error"
49
46
 
50
47
  def issue
51
48
  fail NotImplementedError, "The `##{__method__}` method must be implemented."
@@ -77,8 +74,6 @@ module Git
77
74
  def invalid_line? _line
78
75
  fail NotImplementedError, "The `.#{__method__}` method must be implemented."
79
76
  end
80
-
81
- def settings = configuration.find_setting(self.class.id)
82
77
  end
83
78
  end
84
79
  end
@@ -17,7 +17,7 @@ module Git
17
17
 
18
18
  private
19
19
 
20
- def minimum = settings.minimum
20
+ def minimum = configuration.commits_author_name_minimum
21
21
  end
22
22
  end
23
23
  end
@@ -18,7 +18,9 @@ module Git
18
18
 
19
19
  protected
20
20
 
21
- def load_filter_list = Kit::FilterList.new(settings.excludes)
21
+ def load_filter_list
22
+ Kit::FilterList.new configuration.commits_body_bullet_excludes
23
+ end
22
24
 
23
25
  # :reek:FeatureEnvy
24
26
  def invalid_line? line
@@ -18,7 +18,9 @@ module Git
18
18
 
19
19
  protected
20
20
 
21
- def load_filter_list = Kit::FilterList.new(settings.includes)
21
+ def load_filter_list
22
+ Kit::FilterList.new configuration.commits_body_bullet_capitalization_includes
23
+ end
22
24
 
23
25
  def invalid_line? line
24
26
  line.match?(/\A\s*#{Regexp.union filter_list.to_regexp}\s[[:lower:]]+/)
@@ -18,7 +18,9 @@ module Git
18
18
 
19
19
  protected
20
20
 
21
- def load_filter_list = Kit::FilterList.new(settings.includes)
21
+ def load_filter_list
22
+ Kit::FilterList.new configuration.commits_body_bullet_delimiter_includes
23
+ end
22
24
 
23
25
  def invalid_line?(line) = line.match?(/\A\s*#{pattern}(?!(#{pattern}|\s)).+\Z/)
24
26
 
@@ -22,7 +22,7 @@ module Git
22
22
 
23
23
  private
24
24
 
25
- def maximum = settings.maximum
25
+ def maximum = configuration.commits_body_line_length_maximum
26
26
  end
27
27
  end
28
28
  end
@@ -18,7 +18,9 @@ module Git
18
18
 
19
19
  protected
20
20
 
21
- def load_filter_list = Kit::FilterList.new(settings.excludes)
21
+ def load_filter_list
22
+ Kit::FilterList.new configuration.commits_body_phrase_excludes
23
+ end
22
24
 
23
25
  def invalid_line? line
24
26
  line.downcase.match? Regexp.new(
@@ -14,7 +14,7 @@ module Git
14
14
  valid_lines.size >= minimum
15
15
  end
16
16
 
17
- def minimum = settings.minimum
17
+ def minimum = configuration.commits_body_presence_minimum
18
18
 
19
19
  def issue
20
20
  return {} if valid?
@@ -18,7 +18,9 @@ module Git
18
18
 
19
19
  protected
20
20
 
21
- def load_filter_list = Kit::FilterList.new(settings.includes)
21
+ def load_filter_list
22
+ Kit::FilterList.new configuration.commits_body_single_bullet_includes
23
+ end
22
24
 
23
25
  def invalid_line?(line) = line.match?(/\A#{Regexp.union filter_list.to_regexp}\s+/)
24
26
  end
@@ -18,7 +18,9 @@ module Git
18
18
 
19
19
  protected
20
20
 
21
- def load_filter_list = Kit::FilterList.new(settings.excludes)
21
+ def load_filter_list
22
+ Kit::FilterList.new configuration.commits_body_tracker_shorthand_excludes
23
+ end
22
24
 
23
25
  def invalid_line?(line) = line.match?(/.*#{Regexp.union filter_list.to_regexp}.*/)
24
26
  end
@@ -15,7 +15,9 @@ module Git
15
15
 
16
16
  protected
17
17
 
18
- def load_filter_list = Kit::FilterList.new(settings.includes)
18
+ def load_filter_list
19
+ Kit::FilterList.new configuration.commits_signature_includes
20
+ end
19
21
  end
20
22
  end
21
23
  end
@@ -15,7 +15,7 @@ module Git
15
15
 
16
16
  private
17
17
 
18
- def maximum = settings.maximum
18
+ def maximum = configuration.commits_subject_length_maximum
19
19
  end
20
20
  end
21
21
  end
@@ -21,14 +21,16 @@ module Git
21
21
  protected
22
22
 
23
23
  def load_filter_list
24
- settings.includes
25
- .map { |prefix| "#{prefix}#{settings.delimiter}" }
26
- .then { |list| Kit::FilterList.new list }
24
+ configuration.commits_subject_prefix_includes
25
+ .map { |prefix| "#{prefix}#{delimiter}" }
26
+ .then { |list| Kit::FilterList.new list }
27
27
  end
28
28
 
29
29
  def locally_prefixed? = !ci? && commit.prefix?
30
30
 
31
31
  def ci? = environment["CI"] == "true"
32
+
33
+ def delimiter = configuration.commits_subject_prefix_delimiter
32
34
  end
33
35
  end
34
36
  end
@@ -19,7 +19,9 @@ module Git
19
19
 
20
20
  protected
21
21
 
22
- def load_filter_list = Kit::FilterList.new(settings.excludes)
22
+ def load_filter_list
23
+ Kit::FilterList.new configuration.commits_subject_suffix_excludes
24
+ end
23
25
  end
24
26
  end
25
27
  end