File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 828afaa2fa4cc9e3e53bda0ae3073abfcfa151ca
2
+ refs/heads/master: 724d7235e546fb79009800700fd74328f8171b8c
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
- try :
9
- result = subprocess .check_output ([ "git" , "config" , "core.autocrlf" ])
10
- autocrlf = result .strip () == b"true"
11
- except CalledProcessError :
12
- autocrlf = False
13
-
14
8
def report_err (s ):
15
9
global err
16
10
print ("%s:%d: %s" % (fileinput .filename (), fileinput .filelineno (), s ))
@@ -20,11 +14,10 @@ def report_err(s):
20
14
if line .find ('\t ' ) != - 1 and fileinput .filename ().find ("Makefile" ) == - 1 :
21
15
report_err ("tab character" )
22
16
23
- if not autocrlf and line .find ('\r ' ) != - 1 :
17
+ if line .find ('\r ' ) != - 1 :
24
18
report_err ("CR character" )
25
19
26
- line_len = len (line )- 2 if autocrlf else len (line )- 1
27
- if line_len > cols :
20
+ if len (line )- 1 > cols :
28
21
report_err ("line longer than %d chars" % cols )
29
22
30
23
You can’t perform that action at this time.
0 commit comments