Skip to content

Commit

Permalink
[REF] incoherent-interpreter-exec-perm: Better message (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesus Zapata authored and moylop260 committed Jan 26, 2017
1 parent fc548e2 commit 7c28b0b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pylint_odoo/checkers/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@
settings.DESC_DFLT
),
'W%d01' % settings.BASE_FORMAT_ID: (
'Incoherent interpreter comment and executable permission. '
'Interpreter: [%s] Exec perm: %s',
'You have a python file with execution permissions but you don\'t '
'have a interpreter magic comment. '
'If you really needs a execution permission then add a magic comment '
'( https://en.wikipedia.org/wiki/Shebang_(Unix) ). '
'If you don\'t needs a execution permission then remove it with: '
'chmod -x %s',
'incoherent-interpreter-exec-perm',
settings.DESC_DFLT
),
Expand Down Expand Up @@ -84,4 +88,5 @@ def process_tokens(self, tokens):
if bool(interpreter_content) != access_x:
self.add_message(
'incoherent-interpreter-exec-perm',
line=line_num, args=(interpreter_content, access_x))
line=line_num, args=(
os.path.basename(self.linter.current_file)))

0 comments on commit 7c28b0b

Please sign in to comment.