Enhance Function Method Class Name Checking
Bug #1027413 reported by
raphael shu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
twistedchecker |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
As there are many special names in Twisted,
the rule should be more flexible to cover these names, mainly:
1. Names like foo_BAR, foo_BAR_BAZ.
ex. agentc_
2. Names begin with underscore, as they are special,
we should not check them.
3. Names with specific patterns.
ex. dictCode_221_ready, on_suspend_clicked, opt_mime_type.
These patterns include:
channel_
inotify_
smtpState_
will_,wont_
Related branches
lp://qastaging/~zomux/twistedchecker/enhance-function-method-class-checking
- Jonathan Lange: Disapprove
-
Diff: 111 lines (+62/-3)4 files modifiedtwistedchecker/configuration/pylintrc (+22/-3)
twistedchecker/functionaltests/classname_pass.py (+7/-0)
twistedchecker/functionaltests/functionname_pass.py (+16/-0)
twistedchecker/functionaltests/methodname_pass.py (+17/-0)
lp://qastaging/~zomux/twistedchecker/auto-find-exception
- Jonathan Lange: Approve
-
Diff: 368 lines (+315/-0)4 files modifiedtwistedchecker/core/exceptionfinder.py (+84/-0)
twistedchecker/core/runner.py (+93/-0)
twistedchecker/test/test_exceptionfinder.py (+91/-0)
twistedchecker/test/test_runner.py (+47/-0)
summary: |
- Enhance Function Method Name Checking + Enhance Function Method Class Name Checking |
Changed in twistedchecker: | |
status: | New → Fix Released |
To post a comment you must log in.
We had discussion last night about this on IRC. We decided the program should look for patterns like getattr(self, "request_%s" % x) as a way of figuring out which method names are legitimate.