Skip to content

Commit 7c28b0b

Browse files
Jesus Zapatamoylop260
authored andcommitted
[REF] incoherent-interpreter-exec-perm: Better message (#106)
1 parent fc548e2 commit 7c28b0b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pylint_odoo/checkers/format.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@
1717
settings.DESC_DFLT
1818
),
1919
'W%d01' % settings.BASE_FORMAT_ID: (
20-
'Incoherent interpreter comment and executable permission. '
21-
'Interpreter: [%s] Exec perm: %s',
20+
'You have a python file with execution permissions but you don\'t '
21+
'have a interpreter magic comment. '
22+
'If you really needs a execution permission then add a magic comment '
23+
'( https://en.wikipedia.org/wiki/Shebang_(Unix) ). '
24+
'If you don\'t needs a execution permission then remove it with: '
25+
'chmod -x %s',
2226
'incoherent-interpreter-exec-perm',
2327
settings.DESC_DFLT
2428
),
@@ -84,4 +88,5 @@ def process_tokens(self, tokens):
8488
if bool(interpreter_content) != access_x:
8589
self.add_message(
8690
'incoherent-interpreter-exec-perm',
87-
line=line_num, args=(interpreter_content, access_x))
91+
line=line_num, args=(
92+
os.path.basename(self.linter.current_file)))

0 commit comments

Comments
 (0)