git-lint 2.3.0 → 2.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: 9a9c8435e0b05c4beaf7129ff10a7e4e794374031fa1d1707234e27de5d3f815
4
- data.tar.gz: fc01c78223f9fdbc1f458214d037e79d5c05245cfdcd2815e5c8d90583464322
3
+ metadata.gz: 6f84ea345a2766e79b70b6b4f6a596def5a0ddcc4ba86954b754459fb88f7b8c
4
+ data.tar.gz: 1f6c09a430050ec57cacb4942347200bc83b0bc6a268939eaafbbbacb88d284d
5
5
  SHA512:
6
- metadata.gz: 3dac7a51483e7f92f72616226350611316aa0d2e2b9669080ebbfc5aba76b4df432b316d1a4e7e4a17f308dbe3b24d4891f81656c6c0189153ad1d6b9fed098f
7
- data.tar.gz: 03e9445f0624f688b7bbb1cf11987cc56c31ebb52878a459b4ec26b6d9dd2994624b3602323e1ad8b3fb551803a2f9fd187214430a1831c93590391ec4a63108
6
+ metadata.gz: 79448218359e860c42656a0b8e9e114fbc13eae838d493566b5bd6a2f0e499ccb4de5a94073770a954fe7b768244bb8bb0fc28fc4732ba1ac76855c755fd628f
7
+ data.tar.gz: d46f1b0c3ad4ffdc9655358c02dc0929970d7b6f2c88b4889ec0849de899a052c8359d7d6c199bb07af0045c7be3d1459a6b8efbff208574624761d8641e5627
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -18,8 +18,11 @@ image::https://travis-ci.org/bkuhlmann/git-lint.svg?branch=main[Travis CI Status
18
18
  [link=https://app.netlify.com/sites/git-lint/deploys]
19
19
  image::https://api.netlify.com/api/v1/badges/7e23b422-3412-4e7f-b654-65c0417a0b1f/deploy-status[Netlify CI Status]
20
20
 
21
- A command line interface for linting Git commits. Ensures you maintain a clean, easy to read,
22
- debuggable, and maintainable project history.
21
+ Git Lint is a command line interface for linting Git commits by ensuring you maintain a clean, easy
22
+ to read, debuggable, and maintainable project history. Having a consistent commit history leads to
23
+ improved code reviews and is a perfect companion to tools like
24
+ link:https://www.alchemists.io/projects/milestoner[Milestoner] for versioning and producing
25
+ automated release notes of your deploys.
23
26
 
24
27
  toc::[]
25
28
 
@@ -109,7 +112,8 @@ require "git/lint/rake/setup"
109
112
 
110
113
  Now, when running `bundle exec rake -T`, you'll see `git_lint` included in the list.
111
114
 
112
- If you need a concrete example, check out the link:Rakefile[Rakefile] of this project for details.
115
+ If you need a concrete example, check out the
116
+ link:https://github.com/bkuhlmann/git-lint/blob/main/Rakefile[Rakefile] of this project for details.
113
117
 
114
118
  === Default Branch
115
119
 
@@ -731,12 +735,12 @@ Automatically ignores _fixup!_ or _squash!_ commit prefixes when calculating sub
731
735
  | true | error | includes: (see below)
732
736
  |===
733
737
 
734
- Ensures the commit subject uses consistent prefixes that explain _what_ is being committed. The
738
+ Ensures each commit subject uses consistent prefixes that explain _what_ is being committed. The
735
739
  `includes` are _case sensitive_ and default to the following prefixes:
736
740
 
737
741
  * *Fixed* - Identifies what was fixed. The commit should be as small as possible and consist of
738
- changes to implementation and spec only. In some cases this might be a single line or file change.
739
- The important point is the change is applied to existing code which corrects behavior that wasn't
742
+ changes to implementation and spec only. In some cases this might be a single line change. The
743
+ important point is the change is applied to existing code which corrects behavior that wasn't
740
744
  properly implemented earlier.
741
745
  * *Removed* - Identifies what was removed. The commit should be as small as possible and consist
742
746
  only of removed lines/files from the existing implementation. This might also mean breaking
@@ -754,14 +758,17 @@ Ensures the commit subject uses consistent prefixes that explain _what_ is being
754
758
  implementation behavior or corresponding specs because, if that happens, then one of the other
755
759
  four prefixes is what you want to use instead.
756
760
 
757
- In practice, using a prefix other than what has been detailed above to explain _what_ is being
758
- committed is never needed. These prefixes are not only short and easy to remember but also have the
761
+ In practice, it is quite rare to need a prefix other than what has been detailed above to explain
762
+ _what_ is being committed. These prefixes are not only short and easy to remember but also have the
759
763
  added benefit of categorizing the commits for building release notes, change logs, etc. This becomes
760
- handy when coupled with another tool, link:https://www.alchemists.io/projects/milestoner[Milestoner],
761
- for producing consistent project milestones and Git tag histories.
764
+ handy when coupled with another tool,
765
+ link:https://www.alchemists.io/projects/milestoner[Milestoner], for producing consistent project
766
+ milestones and Git tag histories. For a deeper dive on subject prefixes and good commit messages in
767
+ general, please read about link:https://www.alchemists.io/articles/git_commit_anatomy[commit anatomy
768
+ ] to learn more. 🎉
762
769
 
763
- 💡 Automatically ignores _amend!_, _fixup!_, or _squash!_ commit prefixes when used as a Git Hook in
764
- order to not disturb interactive rebase workflows.
770
+ 💡 This analyzer automatically ignores _amend!_, _fixup!_, or _squash!_ commit prefixes when used as
771
+ a Git Hook in order to not disturb interactive rebase workflows.
765
772
 
766
773
  === Commit Subject Suffix
767
774
 
@@ -899,8 +906,9 @@ worth considering:
899
906
  Submodules can accomplish.
900
907
  * Avoid using link:https://git-lfs.github.com[Git LFS] for tracking binary artifacts/resources.
901
908
  These files are not meant for version control and lead to large repositories that are time
902
- consuming to clone/deploy. Use storage managers, like link:https://aws.amazon.com/s3[Amazon S3]
903
- for example, that are better suited for binary assets that don't change often.
909
+ consuming to clone/deploy. Use storage managers, like link:https://aws.amazon.com/s3[Amazon S3] or
910
+ link:https://lakefs.io[LakeFS] for example, that are better suited for binary assets that don't
911
+ change often.
904
912
 
905
913
  === Security
906
914
 
@@ -17,7 +17,7 @@ module Git
17
17
  def valid?
18
18
  return true if commit.fixup?
19
19
 
20
- valid_lines = commit.body_lines.reject { |line| line.match?(/^\s*$/) }
20
+ valid_lines = commit.body_lines.grep_v(/^\s*$/)
21
21
  valid_lines.size >= minimum
22
22
  end
23
23
 
data/lib/git/lint/cli.rb CHANGED
@@ -78,7 +78,7 @@ module Git
78
78
  else
79
79
  help "--hook"
80
80
  end
81
- rescue Errors::Base, GitPlus::Errors::Base => error
81
+ rescue Errors::Base, GitPlus::Error => error
82
82
  abort colorizer.red("#{Identity::LABEL}: #{error.message}")
83
83
  end
84
84
 
@@ -6,8 +6,8 @@ module Git
6
6
  module Identity
7
7
  NAME = "git-lint"
8
8
  LABEL = "Git Lint"
9
- VERSION = "2.3.0"
10
- VERSION_LABEL = "#{LABEL} #{VERSION}"
9
+ VERSION = "2.4.0"
10
+ VERSION_LABEL = "#{LABEL} #{VERSION}".freeze
11
11
  end
12
12
  end
13
13
  end
data/lib/git/lint.rb CHANGED
@@ -1,20 +1,50 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "zeitwerk"
4
3
  require "git_plus"
5
-
6
- loader = Zeitwerk::Loader.new
7
- loader.inflector.inflect "cli" => "CLI",
8
- "sha" => "SHA",
9
- "circle_ci" => "CircleCI",
10
- "netlify_ci" => "NetlifyCI",
11
- "travis_ci" => "TravisCI"
12
- loader.push_dir "#{__dir__}/.."
13
- loader.ignore "#{__dir__}/lint/rake/setup.rb"
14
- loader.setup
15
-
16
- # Main namespace.
17
- module Git
18
- module Lint
19
- end
20
- end
4
+ require "git/lint/identity"
5
+ require "git/lint/refinements/strings"
6
+ require "git/lint/errors/base"
7
+ require "git/lint/errors/severity"
8
+ require "git/lint/errors/sha"
9
+ require "git/lint/kit/filter_list"
10
+ require "git/lint/validators/email"
11
+ require "git/lint/validators/name"
12
+ require "git/lint/validators/capitalization"
13
+ require "git/lint/parsers/trailers/collaborator"
14
+ require "git/lint/branches/environments/local"
15
+ require "git/lint/branches/environments/circle_ci"
16
+ require "git/lint/branches/environments/git_hub_action"
17
+ require "git/lint/branches/environments/netlify_ci"
18
+ require "git/lint/branches/environments/travis_ci"
19
+ require "git/lint/branches/feature"
20
+ require "git/lint/analyzers/abstract"
21
+ require "git/lint/analyzers/commit_author_capitalization"
22
+ require "git/lint/analyzers/commit_author_email"
23
+ require "git/lint/analyzers/commit_author_name"
24
+ require "git/lint/analyzers/commit_body_bullet"
25
+ require "git/lint/analyzers/commit_body_bullet_capitalization"
26
+ require "git/lint/analyzers/commit_body_bullet_delimiter"
27
+ require "git/lint/analyzers/commit_body_issue_tracker_link"
28
+ require "git/lint/analyzers/commit_body_leading_line"
29
+ require "git/lint/analyzers/commit_body_line_length"
30
+ require "git/lint/analyzers/commit_body_paragraph_capitalization"
31
+ require "git/lint/analyzers/commit_body_phrase"
32
+ require "git/lint/analyzers/commit_body_presence"
33
+ require "git/lint/analyzers/commit_body_single_bullet"
34
+ require "git/lint/analyzers/commit_subject_length"
35
+ require "git/lint/analyzers/commit_subject_prefix"
36
+ require "git/lint/analyzers/commit_subject_suffix"
37
+ require "git/lint/analyzers/commit_trailer_collaborator_capitalization"
38
+ require "git/lint/analyzers/commit_trailer_collaborator_duplication"
39
+ require "git/lint/analyzers/commit_trailer_collaborator_email"
40
+ require "git/lint/analyzers/commit_trailer_collaborator_key"
41
+ require "git/lint/analyzers/commit_trailer_collaborator_name"
42
+ require "git/lint/collector"
43
+ require "git/lint/reporters/lines/sentence"
44
+ require "git/lint/reporters/lines/paragraph"
45
+ require "git/lint/reporters/line"
46
+ require "git/lint/reporters/style"
47
+ require "git/lint/reporters/commit"
48
+ require "git/lint/reporters/branch"
49
+ require "git/lint/runner"
50
+ require "git/lint/cli"
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: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  lkHilIrX69jq8wMPpBhlaw2mRmeSL50Wv5u6xVBvOHhXFSP1crXM95vfLhLyRYod
29
29
  W2A=
30
30
  -----END CERTIFICATE-----
31
- date: 2021-07-05 00:00:00.000000000 Z
31
+ date: 2021-10-03 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: git_plus
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.5'
39
+ version: '0.6'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.5'
46
+ version: '0.6'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: pastel
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -64,14 +64,14 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '8.0'
67
+ version: '8.4'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '8.0'
74
+ version: '8.4'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: runcom
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -100,20 +100,6 @@ dependencies:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0.20'
103
- - !ruby/object:Gem::Dependency
104
- name: zeitwerk
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
108
- - !ruby/object:Gem::Version
109
- version: '2.4'
110
- type: :runtime
111
- prerelease: false
112
- version_requirements: !ruby/object:Gem::Requirement
113
- requirements:
114
- - - "~>"
115
- - !ruby/object:Gem::Version
116
- version: '2.4'
117
103
  description:
118
104
  email:
119
105
  - brooke@alchemists.io
@@ -200,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
186
  - !ruby/object:Gem::Version
201
187
  version: '0'
202
188
  requirements: []
203
- rubygems_version: 3.2.21
189
+ rubygems_version: 3.2.28
204
190
  signing_key:
205
191
  specification_version: 4
206
192
  summary: A command line interface for linting Git commits.
metadata.gz.sig CHANGED
Binary file