From 6123d6f9bf36167eab130a29fa76bc8957aa183e Mon Sep 17 00:00:00 2001 From: Zach Zodkoy Date: Wed, 30 Mar 2022 04:47:14 -0400 Subject: [PATCH] Don't append --checks=* when the --config or --config-file flags are set (#4210) Appending --checks=* causes clang-tidy to ignore the flags --config and --config-file, which breaks the ability to use a clang-tidy file --- platformio/commands/check/tools/clangtidy.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platformio/commands/check/tools/clangtidy.py b/platformio/commands/check/tools/clangtidy.py index 23ec3c57..e130903e 100644 --- a/platformio/commands/check/tools/clangtidy.py +++ b/platformio/commands/check/tools/clangtidy.py @@ -60,7 +60,9 @@ class ClangtidyCheckTool(CheckToolBase): cmd = [tool_path, "--quiet"] flags = self.get_flags("clangtidy") - if not self.is_flag_set("--checks", flags): + if not ( + self.is_flag_set("--checks", flags) or self.is_flag_set("--config", flags) + ): cmd.append("--checks=*") project_files = self.get_project_target_files(self.options["patterns"])