Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): added pipeline linter for commit and rustlinter #11

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

rjtch
Copy link
Contributor

@rjtch rjtch commented Jan 28, 2024

created anew pr and a new branch for the linter

Replaces: #10

@rjtch rjtch requested a review from afrittoli January 28, 2024 00:04
'subject-case': [
2,
'never',
['sentence-case', 'start-case', 'pascal-case', 'upper-case'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I read this correctly, this rule forbids ['sentence-case', 'start-case', 'pascal-case', 'upper-case'].

I'm not sure if this applies to single words within the subject as well as to the subject as a whole, but I think it would be easier to not forbid any format.

The example subject Fix the URL to the FooBar tool seems to me like a perfectly valid and well-formatted subject, but it would fail three of the rules you excluded:

  • sentence-case because "Fix" is upper case
  • pascal-case because of the word FooBar. Since FooBar could be the name of a tool, a module or a variable, it should keep its case
  • upper-case because of the word URL. Since "URL" is an acronym, it should be in uppercase

Comment on lines +18 to +34
'type-enum': [
2,
'always',
[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
],
],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never used the format type(scope?): subject for commit messages before, it seems to originate from the "Angular" project. I don't mind adopting it for this project if you find it useful.

One thing that I find really useful is to have a descriptive commit message, even more so if the subject length is further reduced because of the type section. To that end I would enable two further rules, I'd be happy to do that as a follow-up PR:

body-leading-blank
condition: body begins with blank line
rule: always

body-empty
condition: body is empty
rule: never

Copy link
Contributor

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the updates!

Personally I would tweak a bit the commit lint rules, but that's something I can do as a follow-up.

@afrittoli afrittoli merged commit 815d3f9 into main Jan 29, 2024
6 checks passed
@afrittoli
Copy link
Contributor

Thanks @davidB - could you squash the commits next time please?

@davidB davidB deleted the fix_for_github_action#2#7#commitlint branch March 7, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants