git-lint 5.0.0 → 5.1.1
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 +1 -1
- data/git-lint.gemspec +3 -2
- data/lib/git/lint/analyzer.rb +7 -5
- data/lib/git/lint/analyzers/abstract.rb +4 -3
- data/lib/git/lint/analyzers/commit_body_bullet_capitalization.rb +1 -1
- data/lib/git/lint/cli/actions/analyze/branch.rb +2 -2
- data/lib/git/lint/cli/actions/analyze/commit.rb +2 -2
- data/lib/git/lint/cli/actions/config.rb +2 -2
- data/lib/git/lint/cli/actions/hook.rb +2 -2
- data/lib/git/lint/cli/parser.rb +4 -3
- data/lib/git/lint/cli/parsers/analyze.rb +2 -1
- data/lib/git/lint/cli/parsers/core.rb +4 -5
- data/lib/git/lint/cli/shell.rb +7 -5
- data/lib/git/lint/kit/filter_list.rb +3 -1
- data/lib/git/lint/reporters/line.rb +3 -1
- data/lib/git/lint/reporters/lines/paragraph.rb +3 -1
- data/lib/git/lint/reporters/lines/sentence.rb +3 -1
- data.tar.gz.sig +0 -0
- metadata +19 -5
- 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: ee879ef7d2e54043b42c8c608a6bcf57869fe7593c65d797f5897dea3208cf18
|
4
|
+
data.tar.gz: 5aa959f0942970ce6881839d5a9c8d419faaf43bcdd5a0a5feb8e94cd71654f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08255c0ed8001b3ebbefb067ccaa94a9319c24146d45c9a39fa9394129e7f72d38c8c5b7df300a5b88e2ffc90f37ed55aba727e07e07e0b8fc1d287caa9313b7'
|
7
|
+
data.tar.gz: 6e77fd97e3aea400d72072aa35b739760027259913776b54a5b4822b4f836f0d2b7d47a0b2510e0a80a415efe599302bea3f548db0c9d97776a247f51177fd89
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
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.
|
5
|
+
spec.version = "5.1.1"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://www.alchemists.io/projects/git-lint"
|
@@ -24,9 +24,10 @@ Gem::Specification.new do |spec|
|
|
24
24
|
|
25
25
|
spec.required_ruby_version = "~> 3.2"
|
26
26
|
spec.add_dependency "cogger", "~> 0.5"
|
27
|
+
spec.add_dependency "core", "~> 0.1.0"
|
27
28
|
spec.add_dependency "dry-container", "~> 0.11"
|
28
29
|
spec.add_dependency "dry-monads", "~> 1.6"
|
29
|
-
spec.add_dependency "gitt", "~> 1.
|
30
|
+
spec.add_dependency "gitt", "~> 1.1"
|
30
31
|
spec.add_dependency "infusible", "~> 1.0"
|
31
32
|
spec.add_dependency "pastel", "~> 0.8"
|
32
33
|
spec.add_dependency "refinements", "~> 10.0"
|
data/lib/git/lint/analyzer.rb
CHANGED
@@ -42,11 +42,13 @@ module Git
|
|
42
42
|
].freeze
|
43
43
|
|
44
44
|
# rubocop:disable Metrics/ParameterLists
|
45
|
-
def initialize
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
def initialize(
|
46
|
+
analyzers: ANALYZERS,
|
47
|
+
collector: Collector.new,
|
48
|
+
reporter: Reporters::Branch,
|
49
|
+
**
|
50
|
+
)
|
51
|
+
super(**)
|
50
52
|
@analyzers = analyzers
|
51
53
|
@collector = collector
|
52
54
|
@reporter = reporter
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
3
4
|
require "refinements/strings"
|
4
5
|
|
5
6
|
module Git
|
@@ -22,8 +23,8 @@ module Git
|
|
22
23
|
|
23
24
|
attr_reader :commit
|
24
25
|
|
25
|
-
def initialize
|
26
|
-
super(**
|
26
|
+
def initialize(commit, **)
|
27
|
+
super(**)
|
27
28
|
@commit = commit
|
28
29
|
@filter_list = load_filter_list
|
29
30
|
end
|
@@ -54,7 +55,7 @@ module Git
|
|
54
55
|
|
55
56
|
attr_reader :filter_list
|
56
57
|
|
57
|
-
def load_filter_list =
|
58
|
+
def load_filter_list = Core::EMPTY_ARRAY
|
58
59
|
|
59
60
|
def affected_commit_body_lines
|
60
61
|
commit.body_lines.each.with_object([]).with_index do |(line, lines), index|
|
@@ -5,7 +5,7 @@ module Git
|
|
5
5
|
module Analyzers
|
6
6
|
# Analyzes commit body for proper capitalization of bullet sentences.
|
7
7
|
class CommitBodyBulletCapitalization < Abstract
|
8
|
-
def valid? = lowercased_bullets.
|
8
|
+
def valid? = lowercased_bullets.empty?
|
9
9
|
|
10
10
|
def issue
|
11
11
|
return {} if valid?
|
@@ -8,8 +8,8 @@ module Git
|
|
8
8
|
class Config
|
9
9
|
include Git::Lint::Import[:kernel, :logger]
|
10
10
|
|
11
|
-
def initialize
|
12
|
-
super(**
|
11
|
+
def initialize(configuration: Configuration::Loader::CLIENT, **)
|
12
|
+
super(**)
|
13
13
|
@configuration = configuration
|
14
14
|
end
|
15
15
|
|
data/lib/git/lint/cli/parser.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
3
4
|
require "optparse"
|
4
5
|
|
5
6
|
module Git
|
@@ -12,14 +13,14 @@ module Git
|
|
12
13
|
CLIENT = OptionParser.new nil, 40, " "
|
13
14
|
SECTIONS = [Parsers::Core, Parsers::Analyze].freeze # Order matters.
|
14
15
|
|
15
|
-
def initialize
|
16
|
-
super(**
|
16
|
+
def initialize(sections: SECTIONS, client: CLIENT, **)
|
17
|
+
super(**)
|
17
18
|
@sections = sections
|
18
19
|
@client = client
|
19
20
|
@configuration_duplicate = configuration.dup
|
20
21
|
end
|
21
22
|
|
22
|
-
def call arguments =
|
23
|
+
def call arguments = Core::EMPTY_ARRAY
|
23
24
|
sections.each { |section| section.call configuration_duplicate, client: }
|
24
25
|
client.parse arguments
|
25
26
|
configuration_duplicate.freeze
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
3
4
|
require "refinements/structs"
|
4
5
|
|
5
6
|
module Git
|
@@ -17,7 +18,7 @@ module Git
|
|
17
18
|
@client = client
|
18
19
|
end
|
19
20
|
|
20
|
-
def call arguments =
|
21
|
+
def call arguments = ::Core::EMPTY_ARRAY
|
21
22
|
client.separator "\nANALYZE OPTIONS:\n"
|
22
23
|
add_sha
|
23
24
|
client.parse arguments
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
3
4
|
require "refinements/structs"
|
4
5
|
|
5
6
|
module Git
|
@@ -14,15 +15,13 @@ module Git
|
|
14
15
|
|
15
16
|
def self.call(...) = new(...).call
|
16
17
|
|
17
|
-
def initialize
|
18
|
-
|
19
|
-
**dependencies
|
20
|
-
super(**dependencies)
|
18
|
+
def initialize(configuration = Container[:configuration], client: Parser::CLIENT, **)
|
19
|
+
super(**)
|
21
20
|
@configuration = configuration
|
22
21
|
@client = client
|
23
22
|
end
|
24
23
|
|
25
|
-
def call arguments =
|
24
|
+
def call arguments = ::Core::EMPTY_ARRAY
|
26
25
|
client.banner = specification.labeled_summary
|
27
26
|
client.separator "\nUSAGE:\n"
|
28
27
|
collate
|
data/lib/git/lint/cli/shell.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
4
|
+
|
3
5
|
module Git
|
4
6
|
module Lint
|
5
7
|
module CLI
|
@@ -14,13 +16,13 @@ module Git
|
|
14
16
|
:logger
|
15
17
|
]
|
16
18
|
|
17
|
-
def initialize
|
18
|
-
super(**
|
19
|
+
def initialize(parser: Parser.new, **)
|
20
|
+
super(**)
|
19
21
|
@parser = parser
|
20
22
|
end
|
21
23
|
|
22
|
-
def call arguments =
|
23
|
-
|
24
|
+
def call arguments = Core::EMPTY_ARRAY
|
25
|
+
act_on parser.call(arguments)
|
24
26
|
rescue OptionParser::ParseError, Errors::Base => error
|
25
27
|
logger.error { error.message }
|
26
28
|
end
|
@@ -29,7 +31,7 @@ module Git
|
|
29
31
|
|
30
32
|
attr_reader :parser
|
31
33
|
|
32
|
-
def
|
34
|
+
def act_on configuration
|
33
35
|
case configuration
|
34
36
|
in action_analyze: true, analyze_sha: nil then analyze_branch.call
|
35
37
|
in action_analyze: true, analyze_sha: String => sha then analyze_commit.call sha
|
@@ -1,11 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
4
|
+
|
3
5
|
module Git
|
4
6
|
module Lint
|
5
7
|
module Kit
|
6
8
|
# Represents an regular expression list which may be used as an analyzer setting.
|
7
9
|
class FilterList
|
8
|
-
def initialize list =
|
10
|
+
def initialize list = Core::EMPTY_ARRAY
|
9
11
|
@list = Array list
|
10
12
|
end
|
11
13
|
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
4
|
+
|
3
5
|
module Git
|
4
6
|
module Lint
|
5
7
|
module Reporters
|
@@ -7,7 +9,7 @@ module Git
|
|
7
9
|
class Line
|
8
10
|
DEFAULT_INDENT = " "
|
9
11
|
|
10
|
-
def initialize data =
|
12
|
+
def initialize data = Core::EMPTY_HASH
|
11
13
|
@data = data
|
12
14
|
end
|
13
15
|
|
@@ -1,12 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
4
|
+
|
3
5
|
module Git
|
4
6
|
module Lint
|
5
7
|
module Reporters
|
6
8
|
module Lines
|
7
9
|
# Reports paragraph details.
|
8
10
|
class Paragraph
|
9
|
-
def initialize data =
|
11
|
+
def initialize data = Core::EMPTY_HASH
|
10
12
|
@data = data
|
11
13
|
end
|
12
14
|
|
@@ -1,12 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "core"
|
4
|
+
|
3
5
|
module Git
|
4
6
|
module Lint
|
5
7
|
module Reporters
|
6
8
|
module Lines
|
7
9
|
# Reports sentence details.
|
8
10
|
class Sentence
|
9
|
-
def initialize data =
|
11
|
+
def initialize data = Core::EMPTY_HASH
|
10
12
|
@data = data
|
11
13
|
end
|
12
14
|
|
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: 5.
|
4
|
+
version: 5.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
CxDe2+VuChj4I1nvIHdu+E6XoEVlanUPKmSg6nddhkKn2gC45Kyzh6FZqnzH/CRp
|
29
29
|
RFE=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date:
|
31
|
+
date: 2023-02-05 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: cogger
|
@@ -44,6 +44,20 @@ dependencies:
|
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0.5'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: core
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.1.0
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.1.0
|
47
61
|
- !ruby/object:Gem::Dependency
|
48
62
|
name: dry-container
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,14 +92,14 @@ dependencies:
|
|
78
92
|
requirements:
|
79
93
|
- - "~>"
|
80
94
|
- !ruby/object:Gem::Version
|
81
|
-
version: '1.
|
95
|
+
version: '1.1'
|
82
96
|
type: :runtime
|
83
97
|
prerelease: false
|
84
98
|
version_requirements: !ruby/object:Gem::Requirement
|
85
99
|
requirements:
|
86
100
|
- - "~>"
|
87
101
|
- !ruby/object:Gem::Version
|
88
|
-
version: '1.
|
102
|
+
version: '1.1'
|
89
103
|
- !ruby/object:Gem::Dependency
|
90
104
|
name: infusible
|
91
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -283,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
283
297
|
- !ruby/object:Gem::Version
|
284
298
|
version: '0'
|
285
299
|
requirements: []
|
286
|
-
rubygems_version: 3.4.
|
300
|
+
rubygems_version: 3.4.6
|
287
301
|
signing_key:
|
288
302
|
specification_version: 4
|
289
303
|
summary: A command line interface for linting Git commits.
|
metadata.gz.sig
CHANGED
Binary file
|