Ruff
902 rules ruff@0.16.8
Complete effective rule inventory.
Rules
No enabled Ruff rules match this search.
-
S602subprocesscall withshell=Trueseems safe, but may be changed in the future; consider rewriting withoutshell -
S603subprocesscall: check for execution of untrusted input -
S604Function call with
shell=Trueparameter identified, security issue -
S605Starting a process with a shell: seems safe, but may be changed in the future; consider rewriting without
shell -
S606Starting a process without a shell
-
S607Starting a process with a partial executable path
-
S608Possible SQL injection vector through string-based query construction
-
S609Possible wildcard injection in call due to
*usage -
S610Use of Django
extracan lead to SQL injection vulnerabilities -
S611Use of
RawSQLcan lead to SQL injection vulnerabilities -
S612Use of insecure
logging.config.listendetected -
S701Using jinja2 templates with
autoescape=Falseis dangerous and can lead to XSS. Ensureautoescape=Trueor use theselect_autoescapefunction. -
S702Mako templates allow HTML and JavaScript rendering by default and are inherently open to XSS attacks
-
S704Unsafe use of
{name}detected -
SIM101Multiple
isinstancecalls for{name}, merge into a single call -
SIM102Use a single
ifstatement instead of nestedifstatements -
SIM103Return the condition
{condition}directly -
SIM105Use
contextlib.suppress({exception})instead oftry-except-pass -
SIM107Don't use
returnintry-exceptandfinally -
SIM108Use ternary operator
{contents}instead ofif-else-block -
SIM109Use
{replacement}instead of multiple equality comparisons -
SIM110Use
{replacement}instead offorloop -
SIM112Use capitalized environment variable
{expected}instead of{actual} -
SIM113Use
enumerate()for index variable{index}inforloop -
SIM114Combine
ifbranches using logicaloroperator -
SIM115Use a context manager for opening files
-
SIM116Use a dictionary instead of consecutive
ifstatements -
SIM117Use a single
withstatement with multiple contexts instead of nestedwithstatements -
SIM118Use
key {operator} dictinstead ofkey {operator} dict.keys() -
SIM201Use
{left} != {right}instead ofnot {left} == {right} -
SIM202Use
{left} == {right}instead ofnot {left} != {right} -
SIM208Use
{expr}instead ofnot (not {expr}) -
SIM210Remove unnecessary
True if ... else False -
SIM211Use
not ...instead ofFalse if ... else True -
SIM212Use
{expr_else} if {expr_else} else {expr_body}instead of{expr_body} if not {expr_else} else {expr_else} -
SIM220Use
Falseinstead of{name} and not {name} -
SIM221Use
Trueinstead of{name} or not {name} -
SIM222Use
{expr}instead of{replaced} -
SIM223Use
{expr}instead of{replaced} -
SIM300Yoda condition detected