-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
Signed-off-by: rjtch <[email protected]>
'subject-case': [ | ||
2, | ||
'never', | ||
['sentence-case', 'start-case', 'pascal-case', 'upper-case'], |
There was a problem hiding this comment.
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 casepascal-case
because of the wordFooBar
. SinceFooBar
could be the name of a tool, a module or a variable, it should keep its caseupper-case
because of the wordURL
. Since "URL" is an acronym, it should be in uppercase
'type-enum': [ | ||
2, | ||
'always', | ||
[ | ||
'build', | ||
'chore', | ||
'ci', | ||
'docs', | ||
'feat', | ||
'fix', | ||
'perf', | ||
'refactor', | ||
'revert', | ||
'style', | ||
'test', | ||
], | ||
], |
There was a problem hiding this comment.
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
There was a problem hiding this 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.
Thanks @davidB - could you squash the commits next time please? |
created anew pr and a new branch for the linter
Replaces: #10