On 05/22/2017 09:08 AM, Tom de Vries wrote:
On 05/19/2017 03:47 PM, Martin Liška wrote:
+if __name__ == '__main__':
+if len(sys.argv) > 1:
+main()
+else:
+unittest.main()
Hi,
when specifying no arguments to the script, I see:
...
$ ./contrib/check_GNU_style.py
.
--
On 05/19/2017 03:47 PM, Martin Liška wrote:
+if __name__ == '__main__':
+if len(sys.argv) > 1:
+main()
+else:
+unittest.main()
Hi,
when specifying no arguments to the script, I see:
...
$ ./contrib/check_GNU_style.py
.
---
On 05/19/2017 12:39 PM, Tom de Vries wrote:
> On 05/19/2017 11:51 AM, Martin Liška wrote:
>> Hello.
>>
>> I'm sending final (slightly updated) version of the script. I'm also adding
>> Jakub,
>> because I remember he's got another regex patterns he's using for review
>> process?
>> Would it be fi
On 05/19/2017 11:51 AM, Martin Liška wrote:
Hello.
I'm sending final (slightly updated) version of the script. I'm also adding
Jakub,
because I remember he's got another regex patterns he's using for review
process?
Would it be fine to just remove the old *.sh script, or is it preferred to hav
Hello.
I'm sending final (slightly updated) version of the script. I'm also adding
Jakub,
because I remember he's got another regex patterns he's using for review
process?
Would it be fine to just remove the old *.sh script, or is it preferred to have
them both living next to each other for some
On 05/15/2017 09:31 PM, Florian Weimer wrote:
> * Martin Liška:
>
>> validate(pfile.target_file.lstrip('b/'),
>> line.target_line_no, line.value)
>
> Violates line length constraint. :)
Yep, fixed in another email in this thread.
>
> My own egrep script also checks for/switch/
On 05/15/2017 10:35 PM, Martin Sebor wrote:
> On 05/15/2017 07:55 AM, Martin Liška wrote:
>> Hello.
>>
>> Recently I've been working on bigger changes to dump infrastructure and I
>> had to
>> fix tens of formatting issues reported by check_GNU_style.sh script. The
>> script works
>> quite fine,
On 05/15/2017 07:55 AM, Martin Liška wrote:
Hello.
Recently I've been working on bigger changes to dump infrastructure and I had to
fix tens of formatting issues reported by check_GNU_style.sh script. The script
works
quite fine, but it's very unpleasant that it reports problematic lines in the
* Martin Liška:
> validate(pfile.target_file.lstrip('b/'), line.target_line_no,
> line.value)
Violates line length constraint. :)
My own egrep script also checks for/switch/if/while/do on the same
line as "{", and "(" not preceded by whitespace (currently has false
positves with
On 05/15/2017 03:55 PM, Martin Liška wrote:
... check_GNU_style.sh script. The script works
quite fine, but it's very unpleasant that it reports problematic lines in the
patch,
not in original patches.
Agreed.
I decided to substitute part of functionality by Python
script that uses a library
Sorry, wrong file.
Martin
#!/usr/bin/env python3
import sys
import re
from unidiff import PatchSet
def report_error(filename, line_no, error):
print('%s:%d:%s' % (filename, line_no, error))
def validate(filename, line_no, line):
# 1: validate line length
line_expanded = line.replac
11 matches
Mail list logo