From efe0c48266bba7c3febe995cab311be00c284930 Mon Sep 17 00:00:00 2001 From: Nicolas Vuillamy Date: Wed, 20 Sep 2023 13:24:18 +0200 Subject: [PATCH] Fix IGNORE_GITIGNORED_FILES not working anymore (#2967) Fixes https://github.com/oxsecurity/megalinter/issues/2955 --- CHANGELOG.md | 1 + megalinter/MegaLinter.py | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90b7a163718..ee5dac7c473 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - Replace `https://megalinter.io/flavors` with `https://megalinter.io/latest/flavors` to avoid lychee 404 error - Fix [v7 issue when using MEGALINTER_FILES_TO_LINT](https://github.com/oxsecurity/megalinter/issues/2744) ( thanks @pfiaux !) - Fix [Ignore symlink files when VALIDATE_ALL_CODEBASE is false](https://github.com/oxsecurity/megalinter/issues/2944) +- Fix [IGNORE_GITIGNORED_FILES not working anymore](https://github.com/oxsecurity/megalinter/issues/2955) - Media - [Maximize your code consistency with Megalinter](https://codewithme.cloud/posts/2023/08/maximize-your-code-consistency-with-megalinter/) by [Tor Ivar Asbølmo](https://www.linkedin.com/in/torivara/) on [codewithme.cloud](https://codewithme.cloud) diff --git a/megalinter/MegaLinter.py b/megalinter/MegaLinter.py index 234445d7417..2f374c6e149 100644 --- a/megalinter/MegaLinter.py +++ b/megalinter/MegaLinter.py @@ -799,8 +799,6 @@ def list_git_ignored_files(self): ] ).splitlines() ignored_files = map(lambda x: x + "**" if x.endswith("/") else x, ignored_files) - # ignored_files will be match against absolute path (in all_files), so it should be absolute - ignored_files = map(lambda x: os.path.join(dirpath, x), ignored_files) ignored_files = sorted(list(ignored_files)) return ignored_files