20 |
20 |
21 from DocStyle.DocStyleChecker import DocStyleChecker |
21 from DocStyle.DocStyleChecker import DocStyleChecker |
22 from Miscellaneous.MiscellaneousChecker import MiscellaneousChecker |
22 from Miscellaneous.MiscellaneousChecker import MiscellaneousChecker |
23 from Complexity.ComplexityChecker import ComplexityChecker |
23 from Complexity.ComplexityChecker import ComplexityChecker |
24 from Security.SecurityChecker import SecurityChecker |
24 from Security.SecurityChecker import SecurityChecker |
|
25 from PathLib.PathlibChecker import PathlibChecker |
25 |
26 |
26 |
27 |
27 def initService(): |
28 def initService(): |
28 """ |
29 """ |
29 Initialize the service and return the entry point. |
30 Initialize the service and return the entry point. |
430 source, filename, select, ignore, [], repeatMessages, |
431 source, filename, select, ignore, [], repeatMessages, |
431 securityArgs) |
432 securityArgs) |
432 securityChecker.run() |
433 securityChecker.run() |
433 stats.update(securityChecker.counters) |
434 stats.update(securityChecker.counters) |
434 errors += securityChecker.errors |
435 errors += securityChecker.errors |
|
436 |
|
437 pathlibChecker = PathlibChecker( |
|
438 source, filename, select, ignore, [], repeatMessages) |
|
439 pathlibChecker.run() |
|
440 stats.update(pathlibChecker.counters) |
|
441 errors += pathlibChecker.errors |
435 |
442 |
436 errorsDict = {} |
443 errorsDict = {} |
437 for error in errors: |
444 for error in errors: |
438 if error["line"] > len(source): |
445 if error["line"] > len(source): |
439 error["line"] = len(source) |
446 error["line"] = len(source) |