#418 closed defect (fixed)
Pylint output show wrong nodes for files
Reported by: | anonymous | Owned by: | osimons |
---|---|---|---|
Priority: | minor | Milestone: | 0.6 |
Component: | General | Version: | dev |
Keywords: | Cc: | ||
Operating System: | BSD |
Description
With Bitten r
How to reprodruce
Use this recipe :
<step id="Checkout" description="Get source code from svn"> <sh:exec executable="svn" args="co http://bitten.edgewall.org/svn/${path} . -r ${revision} --quiet"/> </step> <step id="Pylint" description="Pylint check" onerror="ignore"> <sh:exec executable="pylint" args="--rcfile=pylint.rc bitten" output="build/pylint-results.out"/> <python:pylint file="build/pylint-results.out"/> </step>
This steeps works perfectly for me and i am able to see logs results and the "Code Lint" report.
The logs resuslt are perfects and clicikng on the file links display tehm correctly in Trac. But in the Code Lint report the file links are incorrects as they are mixed with local file system directories of the bitten-slave.
Exemple in log :
project/controllers/help.py:1: link correctly to the file in Trac source browser.
Same file in Code Lint result :
/home/bertrand/Mydocuments/Developpement/project/controllers/help.py link to an incorrect node because /home/bertrand/Mydocuments/Developpement/ are direcories from my slave filesystem.
PS : Just note than i use a pylint.rc file than is get from the svn project, but i do not think it's in cause.
Attachments (1)
Change History (4)
comment:1 Changed 15 years ago by osimons
- Owner set to osimons
comment:2 Changed 15 years ago by osimons
This makes it work for me on Windows and OSX at least - please test:
-
bitten/build/pythontools.py
a b 152 152 category = msg_categories.get(msg_type[0]) 153 153 if len(msg_type) == 1: 154 154 msg_type = None 155 filename = os.path.realpath(match.group('file')) 156 if filename.startswith(ctxt.basedir): 155 filename = match.group('file') 156 if os.path.isabs(filename) \ 157 and filename.startswith(ctxt.basedir): 157 158 filename = filename[len(ctxt.basedir) + 1:] 158 159 filename = filename.replace(os.sep, '/') 159 160 lineno = int(match.group('line'))
comment:3 Changed 15 years ago by osimons
- Resolution set to fixed
- Status changed from new to closed
Last patch committed in [669].
Yup. Confirmed. I'll look into it.