third-row-text-remover

Try in Playground
pm-other-python-ruleset

picimako

UnknownInformational

0

No tags

No CWE or CVE

Pattern Rule: .*


third-row-text-remover

How to write a rule
function visit(pattern, filename, code) {
  const error = buildError(8, 0, 8, 10, "Info error in the third row", "WARNING", "security");
  const edit = buildEdit(8, 0, 8, 10, "remove", "Text to remove");
  const fix = buildFix("Remove text from the third row", [edit]);
  addError(error.addFix(fix));
}

test.py

Expected test result: no error

class Person:

  def my_function(self, name):
    p2 = ""

  def __init__(self, name, age, address):
    self.name = name
    self.age = age
    self.address = address

def my_function(name):
  p2 = ""

p1 = Person("Johnd", 36)

my_function(p1.name)

my_function(p1.age)
Add comment

Log in to add a comment


    Be the first one to leave a comment!

Codiga Logo
Codiga Hub
  • Rulesets
  • Explore
  • Cookbooks
  • Playground
soc-2 icon

We are SOC-2 Compliance Certified

G2 high performer medal

Codiga – All rights reserved 2022.