File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/python
2
2
3
- import sys , fileinput , subprocess
3
+ import sys , fileinput
4
4
5
5
err = 0
6
6
cols = 78
7
7
8
- config_proc = subprocess .Popen ([ "git" , "config" , "core.autocrlf" ],
9
- stdout = subprocess .PIPE )
10
- result = config_proc .communicate ()[0 ]
11
- autocrlf = result .strip () == b"true" if result is not None else False
12
-
13
8
def report_err (s ):
14
9
global err
15
10
print ("%s:%d: %s" % (fileinput .filename (), fileinput .filelineno (), s ))
@@ -19,11 +14,10 @@ def report_err(s):
19
14
if line .find ('\t ' ) != - 1 and fileinput .filename ().find ("Makefile" ) == - 1 :
20
15
report_err ("tab character" )
21
16
22
- if not autocrlf and line .find ('\r ' ) != - 1 :
17
+ if line .find ('\r ' ) != - 1 :
23
18
report_err ("CR character" )
24
19
25
- line_len = len (line )- 2 if autocrlf else len (line )- 1
26
- if line_len > cols :
20
+ if len (line )- 1 > cols :
27
21
report_err ("line longer than %d chars" % cols )
28
22
29
23
You can’t perform that action at this time.
0 commit comments