From da6a41e008c4c28b679ef4f064beb1dd2e59f677 Mon Sep 17 00:00:00 2001 From: Nicolas Vuillamy Date: Sat, 26 Aug 2023 22:50:09 +0200 Subject: [PATCH] Fix v7 issue when using MEGALINTER_FILES_TO_LINT (#2917) * Fix v7 issue when using MEGALINTER_FILES_TO_LINT Fixes https://github.com/oxsecurity/megalinter/issues/2744 * cspell --- .cspell.json | 1 + CHANGELOG.md | 1 + megalinter/MegaLinter.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.cspell.json b/.cspell.json index 617da5458d3..3165b634b35 100644 --- a/.cspell.json +++ b/.cspell.json @@ -111,6 +111,7 @@ "pacote", "paren", "pbab", + "pfiaux", "pify", "punycode", "pushexample", diff --git a/CHANGELOG.md b/CHANGELOG.md index 144282df6e9..62750210ed2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - Fix rstcheck options & install - Deprecate SCSS LINT as not maintained anymore () - 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 !) - Linter versions upgrades - [mypy](https://mypy.readthedocs.io/en/stable/) from 1.4.1 to **1.5.0** on 2023-08-11 diff --git a/megalinter/MegaLinter.py b/megalinter/MegaLinter.py index 8bcb894d5e7..7a4a50f3d1f 100644 --- a/megalinter/MegaLinter.py +++ b/megalinter/MegaLinter.py @@ -630,7 +630,7 @@ def collect_files(self): all_files = list() for file_to_lint in files_to_lint: if os.path.isfile(self.workspace + os.path.sep + file_to_lint): - all_files += [self.workspace + os.path.sep + file_to_lint] + all_files += [file_to_lint] else: logging.warning( "[File listing] Input file "