ignore path in pylint config raises regex error

91 Views Asked by At

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?

2

There are 2 best solutions below

2
NomanAbid On BEST ANSWER

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.

1
Prudhviraj Panisetti On
ignore-paths=^kernel/.*$

Change the ignore-path kernel value as above.

^kernel/.*$ should match anything within the "kernel" directory and its subdirectories.