summaryrefslogtreecommitdiff
path: root/pylint/lint/pylinter.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/lint/pylinter.py')
-rw-r--r--pylint/lint/pylinter.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/pylint/lint/pylinter.py b/pylint/lint/pylinter.py
index 6e6ccd59b..3be78c46c 100644
--- a/pylint/lint/pylinter.py
+++ b/pylint/lint/pylinter.py
@@ -46,7 +46,14 @@ from pylint.typing import (
MessageLocationTuple,
ModuleDescriptionDict,
)
-from pylint.utils import ASTWalker, FileState, LinterStats, ModuleStats, utils
+from pylint.utils import (
+ ASTWalker,
+ FileState,
+ LinterStats,
+ ModuleStats,
+ get_global_option,
+ utils,
+)
from pylint.utils.pragma_parser import (
OPTION_PO,
InvalidPragmaError,
@@ -220,12 +227,12 @@ class PyLinter(
(
"ignore-paths",
{
- "type": "regexp_csv",
+ "type": "regexp_paths_csv",
"metavar": "<pattern>[,<pattern>...]",
- "dest": "ignore_list_paths_re",
- "default": (),
- "help": "Add files or directories matching the regex patterns to the"
- " ignore-list. The regex matches against paths.",
+ "default": [],
+ "help": "Add files or directories matching the regex patterns to the "
+ "ignore-list. The regex matches against paths and can be in "
+ "Posix or Windows format.",
},
),
(
@@ -1101,7 +1108,7 @@ class PyLinter(
modules,
self.config.black_list,
self.config.black_list_re,
- self.config.ignore_list_paths_re,
+ self._ignore_paths,
)
for error in errors:
message = modname = error["mod"]
@@ -1259,6 +1266,7 @@ class PyLinter(
self.config.extension_pkg_whitelist
)
self.stats.reset_message_count()
+ self._ignore_paths = get_global_option(self, "ignore-paths")
def generate_reports(self):
"""close the whole package /module, it's time to make reports !