-
Notifications
You must be signed in to change notification settings - Fork 91
Commit Checks #818
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
Comments
The original intent was to check if a commit was viable based on minimal linting. If it passed that, all the other checks were run, so they would all report issues. The viable checks assumed if the minimal check was not met, more checking would probably fail. Can this be adjusted for your needs (and linting requirements) or is a plug-in framework needed (that could help with generic project support as well). Not sure if this answers your issue. If a PR is viable, all lints should run. If they don't, we messed up conversion from asynch to synch methods (my opinion). |
My point is that the logic is flawed: You can't report that the message would be "too short" from a check that doesn't measure the message length but the line count. The other point is: The user should be told right away what he needs to change instead of getting a vague message first and only afterwards the actual required changes. "Hey, why didn't you tell me right away what you want?" The solution is simple: |
I think a configuration file (see #829) would be sufficient where you can specify like:
|
I'm not nit-picking about hypothetical situations. I've gone through this myself when I submitted a (real) patchset as PR for testing:
then I realized that I wouldn't have been required to increase the text lengths at all. the addition of a signed-off line alone is silencing the "message too short" check. And the annoyed user has been me in that case. ;-) |
I agree with this except with one important aspect. It should not be he who should be told. You are single-handedly trying to brush away half of humanity, the legacy of the original coders, as well as (probably inadvertently) manifesting that awful gender bias that haunts the software industry. Please don't. Use "they", as Shakespeare would have. Don't pretend that every human being worth being a user of GitGitGadget is male. |
I considered this as an informal conversation among 3 developers, not an official text ;-) |
I am reworking Regarding the needs of another project, would it be better to allow a plugin to replace the linter? This could be loaded at run-time via configuration. Might be simpler than trying to configure which checks and check values are needed. |
We don't have much different requirements, so wouldn't need a plugin mechanism. The only change I made is this (the last block) - and that's it.. private commitMessageLength(): void {
const maxColumns = 76;
if (this.lines[0].length > maxColumns) {
this.block(`First line of commit message is too long (> ${
maxColumns} columns): ${this.lines[0]}`);
}
if (this.lines[1].length) {
this.block("The first line must be separated from the rest by an "
+ "empty line");
}
for (let i = 2; i < this.lines.length; i++) {
if (this.lines[i].length > 72) {
this.block("Please wrap lines in the body of the commit " +
"message between 60 and 72 characters.");
break;
}
}
} |
Some simple parametrization would do it IMO, like: const COMMITLINT_MESSAGEWRAPCHECK_ENABLED = true;
const COMMITLINT_MESSAGEWRAPCHECK_MAX_COLS = 72;
const COMMITLINT_MESSAGEWRAPCHECK_MSG = "Please wrap " +
"lines in the body of the commit message " +
"between 60 and 72 characters."; |
And I am really appalled by the disrespect for non-male people. I have no patience for that. If you want to be respected, respect others first. |
You got me wrong. I highly respect all human beings equally and I'm one of the most tolerant people toward all kinds of concepts of life and existence. Also I admit that saying "he" in the context above is not ideal for a common audience and I usually avoid this. I just disagree with recent proposals to language changes (especially German). This has nothing to do with one's general attitude towards life, people and individual humans of whatever kind, though. |
It sounds a bit disingenuous if a representative of an over-represented gender tries to defend that they don't want to change their gendered language, even if they know that it is wrong. I am sure you can do better. |
What you consider better is what I consider worse - seems we both got strong positions regarding language evolvement.. |
The problem I see here is that you fight for your convenience. And I fight for other people to get the respect they deserve. Not quite on an equal footing, those positions, I'd say. |
I don't fight. And my reasons are multifold, convenience is none of them. I respect your opinion, I value your passion and I concur with the intention. The difference is that I disagree to the way. Hyper-imposed language changes are causing a split in society and have a strong adverse effect of rejection which people are eventually projecting on the whole subject. Another difference is that I'm not making despicable assumptions about your motivations in every single reply. |
gitgitgadget/lib/commit-lint.ts
Lines 35 to 41 in 41979ba
The requirements are similar to ours but there are differences, so it's moot to discuss individual ones. Just the above seems a bit odd:
I just wonder why it's done that way..
The text was updated successfully, but these errors were encountered: