necessarily long comments are reported as errors
Bug #1252825 reported by
Jean-Paul Calderone
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
twistedchecker |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
exarkun@top:/tmp$ cat longcomment.py
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
# http://
exarkun@top:/tmp$ PYTHONPATH=
************* Module longcomment
C0301: 4,0: Line too long (99/79)
W9402: 4,0: The first letter of comment should be capitalized
...
exarkun@top:/tmp$
Neither of these errors is appropriate. "http" is arguably more correct than "Http" and there is no good way to make this line fit within the normal bounds.
Changed in twistedchecker: | |
status: | New → Confirmed |
To post a comment you must log in.
From discussions on IRC, I think we've come up with the two things - exarkun, please correct me if I've taken the wrong output from the convo:
1) if a comment contains no whitespace (eg. in the case of a very long link taking up the entire line), it will not produce a warning, and
2) The "The first letter of comment should be capitalized" is full of false positives, and is hard to implement reliably, so it is better to just drop it.
The former will mean disabling pylint's "C0301" warning, and implementing a custom line length checker. comment. py.
The latter will require removing the relevant code from checkers/