Skip to content

nosemgrep comments not honored by extension in python #159

Description

@forana

Anonymized python:

class MyClass (
    ABadClass,  # nosemgrep: myrule
    AnotherClass,
    ADifferentClass,
): ...

Anonymized rule:

  - id: myrule
    languages:
      - python
    severity: ERROR
    message: Do not use ABadClass
    pattern-regex: .*ABadClass.*

Via CLI, the nosemgrep line correctly ignores the error. Via the plugin, the error is not ignored.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions