make check_length work for projects other than Launchpad

Bug #923309 reported by Adi Roiban
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pocket-lint
Fix Released
Medium
Adi Roiban

Bug Description

Right now, the formatchecker has a /lib/lp hardcoded as the condition for checking a non-PEP line length .

In case other projects are using a non-PEP line length it would be nice if pocket-lint will allow some soft of easy customization.

I have attached a branch with adds a degree of customization. It uses a dedicated method for filtering line length checks and returning the length of the line.

Users can path BaseChecker and PythonChecker to change the behavior of check_length.

Another approach would be to add an argument to UniversalChecker and pass the method as argument, but for me, the manual patching looks good enough.

Related branches

Adi Roiban (adiroiban)
summary: - make check_lenght work for projects other than Launchpad
+ make check_length work for projects other than Launchpad
Curtis Hovey (sinzui)
Changed in pocket-lint:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Adi Roiban (adiroiban)
Revision history for this message
Curtis Hovey (sinzui) wrote :

You can now specify the max length using --max-length or -m command line args. The default max length is 80. To verify that a text file conforms to email line-length, you can run this:
    pocketlint -m 72
To verify Lp's rules set the max-length to 78:
        pocketlint -m 72

Changed in pocket-lint:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in pocket-lint:
milestone: none → future
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.