-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Pedantic commit #849
Pedantic commit #849
Conversation
9749402
to
91109f8
Compare
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.
Nice job
syntax/make_commit.sublime-settings
Outdated
@@ -14,5 +14,4 @@ | |||
"gutter": true, | |||
"line_numbers": true, | |||
"word_wrap": true, |
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.
remove the ending comma
91109f8
to
b90d783
Compare
Thanks. I think this is a sensible default. And if anyone hates it. They can change it or turn it of. |
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.
Other than a few "pedantic" notes, this looks good to me!
core/commands/commit.py
Outdated
self.view = view | ||
self.first_line_limit = savvy_settings.get('pedantic_commit_first_line_length') | ||
self.body_line_limit = savvy_settings.get('pedantic_commit_message_line_length') | ||
self.warrning_size = savvy_settings.get('pedantic_commit_warning_length') |
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.
Typo in warrning_size
; should this be warning_size
, or even warning_length
?
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.
yes
core/commands/commit.py
Outdated
|
||
first_line = self.view.lines(sublime.Region(0,0))[0] | ||
length = first_line.b - first_line.a | ||
if self.first_line_limit < length: |
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 think the condition is clearer like this:
if length > self.first_line_limit:
core/commands/commit.py
Outdated
if self.first_line_limit < length: | ||
warning_lines.append(sublime.Region( | ||
first_line.a + self.first_line_limit, | ||
min(first_line.a+self.first_line_limit+self.warrning_size, first_line.b))) |
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 get vexed by the inconsistent spacing around the plus (+) operator... can we please always have space on either side of plusses?
b90d783
to
c0085fa
Compare
Thanks. I will try to finish #813 |
invalid.deprecated.line-too-long.git-commit
whereinvalid
is the same scope as SublimeLinter uses to is should be coverd by all Themesfix #41
fix #423