pythonpylintpylintrc

ignore path in pylint config raises regex error


I have the pylint config:

[MAIN]
load-plugins=pylint_django
django-settings-module=kernel.settings
ignore-paths=^kernel/**$ , ^migrations/*$

But whenever i want to run i get this error for kernel regex:

re.error: multiple repeat at position 10

How to make it so it ignores all subdirs and files inside kernel?


Solution

  • It's an re.error. Which means your regular expression syntax is incorrect.

    so to ignore ALL subdirs and files inside the kernel. simply assign kernel/.* regex value to ignore-paths so it will look like this.

    [MAIN]
    load-plugins=pylint_django
    django-settings-module=kernel.settings
    ignore-paths=^kernel/.*

    hope this solves the problem.