Skip to content

ignoring NOLINT* comments with categories defined in other tools #184

@wjwwood

Description

@wjwwood

If you use this tool and a tool like clang-tidy on your code base and want to suppress both, it can be an issue as it will trigger the readability/nolint warning from this tool, e.g.:

va_copy(args_clone, *args);  // NOLINT(clang-analyzer-valist.Uninitialized)

Will produce a warning like this from cpplint.py:

<...>/logging.c:196:  Unknown NOLINT error category: clang-analyzer-valist.Uninitialized  [readability/nolint] [5]

Is there a recommended way to avoid this without completely disabling [readability/nolint]?

One idea I had was too maintain a list of prefixes that could be ignored, e.g. ignore all NOLINT comments with categories that start with clang-analyzer as an example. This list could be hard coded or could be provided by the user. Is that something that would be desired as a pull request to this repository?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions