Qualite

CNES Pylint Extension

CNES Pylint Extension is a set of additional pylint checks to further cover the CNES Python coding rules standard.

This extension allows to check the following rules:

  • COM.FLOW.ExitLoop - Prohibition to implement more than one exit in loops. - R5101 - multiple-exit-statements
  • COM.DESIGN.Alloc - Prefer to allocate and release resources in the same algorithmic level. - R5106 - use-context-manager
  • COM.MET.Complexity - Obligation to limit the McCabe cyclomatic number according to the software class: A: V(g) ≤ 10 B: V(g) ≤ 10 C: V(g) ≤ 15D: V(g) ≤ 25 - R5301 - too-high-complexity
  • COM.MET.ComplexitySimplified - Requirement to limit the McCabe cyclomatic number simplified by software class: A: Vs(g) ≤ 10 B: Vs(g) ≤ 10 C: Vs(g) ≤ 12 D: Vs(g) ≤ 20 - R5302 - too-high-complexity-simplified
  • COM.MET.RatioComment - Requirement to meet minimum ratio of comments to lines of code based on software class: A: RComment ≥ 30% B: RComment ≥ 30% C: RComment ≥ 20% D: RComment ≥ 20% - R5201 - too-few-comments
  • COM.FLOW.Abort - Prohibition on abruptly stopping a process - R5401 - sys-exit-used
  • COM.FLOW.FilePath - Requirement to use language parameterization means to access files. - R5402 - os-environ-used
  • COM.FLOW.ExitLoop - Prohibit to implement more than one exit in loops. - R5101 - multiple-exit-statements
  • COM.FLOW.Recursion - forbid to use direct and indirect recursion - R5105 - recursive-call
  • COM.FLOW.CheckArguments - Requirement to check parameters passed to a program - R5403 - sys-argv-used
  • COM.INST.LoopCondition - Prohibit using equality or difference expressions in loop conditions (use inequalities) - R5103 - bad-exit-condition
  • PY.MET.Decorator - Avoid stacking more than 5 decorators. - R5102 - too-many-decorators
  • PY.NAME.Homonymy - Prohibit naming a data attribute and a method attribute the same, or naming a map, filter, apply, input and other Python objects/functions - R5104 - builtin-name-used


There are two versions, Pylint 1.5 and Pylint 1.6 compatible

Sources : https://github.com/lequal/cnes-pylint-extension

Issue Tracker : https://github.com/lequal/cnes-pylint-extension/issues 

Releases : https://github.com/lequal/cnes-pylint-extension/releases

CNES Pylint Extension

Thematic

QUALITY

Licence type

Open source

Programming language

Python

Operating system

n

contact image

A question regarding CNES Pylint Extension software ?

Don't hesitate to contact us ! We are here to help you.

Contact

Stay connected

Receive the latest software news of CNES Pylint Extension