Bug 1878806 - Review Request: gitlint - Git commit message linter
Summary: Review Request: gitlint - Git commit message linter
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miguel Angel Ajo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-14 14:41 UTC by Stephen Kitt
Modified: 2020-09-15 13:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-15 13:26:25 UTC
Type: ---
Embargoed:
majopela: fedora-review+


Attachments (Terms of Use)

Description Stephen Kitt 2020-09-14 14:41:10 UTC
Spec URL: https://sk2.org/fedora/gitlint.spec
SRPM URL: https://kojipkgs.fedoraproject.org//work/tasks/4643/51444643/gitlint-0.13.1-1.fc34.src.rpm
Description:
gitlint checks git commit messages for style, using validations based on
well-known community standards or on checks which have proved useful:
maximum title length, trailing whitespace checks, punctuation, tabs,
minimum body mength, valid email addresses...
Fedora Account System Username: skitt

Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=51444643

Comment 1 Miguel Angel Ajo 2020-09-14 15:24:57 UTC
The spec looks good.

Comment 2 Miguel Angel Ajo 2020-09-14 15:45:19 UTC
The linter complains about a couple of things

[majopela@bluehat Downloads]$ rpmlint gitlint*
gitlint.src: W: spelling-error Summary(en_US) linter -> liner, liter, inter
gitlint.src: W: spelling-error %description -l en_US whitespace -> white space, white-space, whites pace
gitlint.src: W: spelling-error %description -l en_US mength -> length
1 packages and 1 specfiles checked; 0 errors, 3 warnings.


I guess the whitespace and mength  can be changed, why does it complain about linter?

Comment 3 Stephen Kitt 2020-09-14 15:48:12 UTC
(In reply to Miguel Angel Ajo from comment #2)
> The linter complains about a couple of things
> 
> [majopela@bluehat Downloads]$ rpmlint gitlint*
> gitlint.src: W: spelling-error Summary(en_US) linter -> liner, liter, inter

I replaced that with “linting tool”, which is fine according to rpmlint.

> gitlint.src: W: spelling-error %description -l en_US whitespace -> white
> space, white-space, whites pace
> gitlint.src: W: spelling-error %description -l en_US mength -> length

Fixed, thanks!

Comment 4 Miguel Angel Ajo 2020-09-14 15:49:59 UTC
another question, BuildRequires: git-core
 

Shouldint this be a Requires/too?, isn't it necessary for running and not for building?

Comment 5 Stephen Kitt 2020-09-14 15:57:05 UTC
(In reply to Miguel Angel Ajo from comment #4)
> another question, BuildRequires: git-core
>  
> 
> Shouldint this be a Requires/too?, isn't it necessary for running and not
> for building?

Indeed, the shell/git module is supposed to check for git so it doesn’t end up being required for all sub-commands AFAICT, but in practice that doesn’t work:

Traceback (most recent call last):
  File "/usr/local/bin/gitlint", line 5, in <module>
    from gitlint.cli import cli
  File "/usr/local/lib/python3.8/site-packages/gitlint/cli.py", line 20, in <module>
    from gitlint.git import GitContext, GitContextError, git_version
  File "/usr/local/lib/python3.8/site-packages/gitlint/git.py", line 4, in <module>
    from gitlint import shell as sh
  File "/usr/local/lib/python3.8/site-packages/gitlint/shell.py", line 13, in <module>
    from sh import git  # pylint: disable=unused-import,import-error
ImportError: cannot import name 'git' from 'sh' (/usr/local/lib/python3.8/site-packages/sh.py)

Fixed in the spec.

Comment 6 Miguel Angel Ajo 2020-09-15 07:40:02 UTC
Thanks


[majopela@bluehat Downloads]$ rpmlint gitlint.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

Comment 7 Stephen Kitt 2020-09-15 13:26:25 UTC
I need to re-file this with my FAS address.


Note You need to log in before you can comment on or make changes to this bug.