diff mbox series

contrib: Improve error text for overlong ChangeLog lines

Message ID 20200602092210.GA3873569@redhat.com
State New
Headers show
Series contrib: Improve error text for overlong ChangeLog lines | expand

Commit Message

Jonathan Wakely June 2, 2020, 9:22 a.m. UTC
This error is wrong, the line is what exceeds LINE_LIMIT characters, the
limit doesn't exceed itself.

contrib/ChangeLog:

	* gcc-changelog/git_commit.py (GitCommit.parse_changelog): Fix
	* grammar.

OK for master?
commit ba4ddb1023844202f84a32275e451f9c7a0bb7b7
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Jun 2 10:19:42 2020 +0100

    contrib: Improve error text for overlong ChangeLog lines
    
    This error is wrong, the line is what exceeds LINE_LIMIT characters, the
    limit doesn't exceed itself.
    
    contrib/ChangeLog:
    
            * gcc-changelog/git_commit.py (GitCommit.parse_changelog): Fix
            * grammar.

Comments

Jonathan Wakely June 2, 2020, 9:23 a.m. UTC | #1
On 02/06/20 10:22 +0100, Jonathan Wakely wrote:
>This error is wrong, the line is what exceeds LINE_LIMIT characters, the
>limit doesn't exceed itself.
>
>contrib/ChangeLog:
>
>	* gcc-changelog/git_commit.py (GitCommit.parse_changelog): Fix
>	* grammar.
>
>OK for master?
>

>commit ba4ddb1023844202f84a32275e451f9c7a0bb7b7
>Author: Jonathan Wakely <jwakely@redhat.com>
>Date:   Tue Jun 2 10:19:42 2020 +0100
>
>    contrib: Improve error text for overlong ChangeLog lines

I used "contrib:" as the component tag here. We should probably decide
if that's right, or if it should be "git_commit" or "gcc-changelog"
(both have been used for recent commits).
Martin Liška June 2, 2020, 9:35 a.m. UTC | #2
On 6/2/20 11:22 AM, Jonathan Wakely wrote:
> OK for master?

You're right.
Please install it.

Martin
Martin Liška June 2, 2020, 9:37 a.m. UTC | #3
On 6/2/20 11:23 AM, Jonathan Wakely wrote:
> On 02/06/20 10:22 +0100, Jonathan Wakely wrote:
>> This error is wrong, the line is what exceeds LINE_LIMIT characters, the
>> limit doesn't exceed itself.
>>
>> contrib/ChangeLog:
>>
>>     * gcc-changelog/git_commit.py (GitCommit.parse_changelog): Fix
>>     * grammar.
>>
>> OK for master?
>>
> 
>> commit ba4ddb1023844202f84a32275e451f9c7a0bb7b7
>> Author: Jonathan Wakely <jwakely@redhat.com>
>> Date:   Tue Jun 2 10:19:42 2020 +0100
>>
>>    contrib: Improve error text for overlong ChangeLog lines
> 
> I used "contrib:" as the component tag here. We should probably decide
> if that's right, or if it should be "git_commit" or "gcc-changelog"
> (both have been used for recent commits).
>

I'm not much used to the components. Btw. do we have it documented somewhere?
I would use gcc-changelog.

Martin
Jonathan Wakely June 2, 2020, 10:18 a.m. UTC | #4
On 02/06/20 11:37 +0200, Martin Liška wrote:
>On 6/2/20 11:23 AM, Jonathan Wakely wrote:
>>On 02/06/20 10:22 +0100, Jonathan Wakely wrote:
>>>This error is wrong, the line is what exceeds LINE_LIMIT characters, the
>>>limit doesn't exceed itself.
>>>
>>>contrib/ChangeLog:
>>>
>>>    * gcc-changelog/git_commit.py (GitCommit.parse_changelog): Fix
>>>    * grammar.
>>>
>>>OK for master?
>>>
>>
>>>commit ba4ddb1023844202f84a32275e451f9c7a0bb7b7
>>>Author: Jonathan Wakely <jwakely@redhat.com>
>>>Date:   Tue Jun 2 10:19:42 2020 +0100
>>>
>>>   contrib: Improve error text for overlong ChangeLog lines
>>
>>I used "contrib:" as the component tag here. We should probably decide
>>if that's right, or if it should be "git_commit" or "gcc-changelog"
>>(both have been used for recent commits).
>>
>
>I'm not much used to the components. Btw. do we have it documented somewhere?
>I would use gcc-changelog.

Done, thanks.
Jonathan Wakely June 2, 2020, 10:44 a.m. UTC | #5
On 02/06/20 11:18 +0100, Jonathan Wakely wrote:
>On 02/06/20 11:37 +0200, Martin Liška wrote:
>>On 6/2/20 11:23 AM, Jonathan Wakely wrote:
>>>On 02/06/20 10:22 +0100, Jonathan Wakely wrote:
>>>>This error is wrong, the line is what exceeds LINE_LIMIT characters, the
>>>>limit doesn't exceed itself.
>>>>
>>>>contrib/ChangeLog:
>>>>
>>>>    * gcc-changelog/git_commit.py (GitCommit.parse_changelog): Fix
>>>>    * grammar.
>>>>
>>>>OK for master?
>>>>
>>>
>>>>commit ba4ddb1023844202f84a32275e451f9c7a0bb7b7
>>>>Author: Jonathan Wakely <jwakely@redhat.com>
>>>>Date:   Tue Jun 2 10:19:42 2020 +0100
>>>>
>>>>   contrib: Improve error text for overlong ChangeLog lines
>>>
>>>I used "contrib:" as the component tag here. We should probably decide
>>>if that's right, or if it should be "git_commit" or "gcc-changelog"
>>>(both have been used for recent commits).
>>>
>>
>>I'm not much used to the components. Btw. do we have it documented somewhere?
>>I would use gcc-changelog.
>
>Done, thanks.

And this fixes the test that now fails (sorry, I didn't know about the
tests). Committed to master.
diff mbox series

Patch

diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index 4f82b58f64b..4f9c37cf0de 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -346,7 +346,7 @@  class GitCommit:
             if line != line.rstrip():
                 self.errors.append(Error('trailing whitespace', line))
             if len(line.replace('\t', ' ' * TAB_WIDTH)) > LINE_LIMIT:
-                self.errors.append(Error('line limit exceeds %d characters'
+                self.errors.append(Error('line exceeds %d character limit'
                                          % LINE_LIMIT, line))
             m = changelog_regex.match(line)
             if m: