Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Fix message of incoherent-interpreter-exec-perm #106

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)))