Skip to content

Conversation

@vbvictor
Copy link
Contributor

@vbvictor vbvictor commented Dec 7, 2025

When working on tests, clangd with option --clang-tidy will report warnings from root clang-tidy config.
I believe these warnings serve no purpose in tests, so we better disable them to silent warnings in IDE.

@llvmbot
Copy link
Member

llvmbot commented Dec 7, 2025

@llvm/pr-subscribers-clang-tools-extra

Author: Baranov Victor (vbvictor)

Changes

When working on tests, clangd with option --clang-tidy will report warnings from "root" clang-tidy config.
I believe these warnings serve no purpose in tests, so we better disable them.


Full diff: https://github.com/llvm/llvm-project/pull/171029.diff

1 Files Affected:

  • (added) clang-tools-extra/test/clang-tidy/.clang-tidy (+1)
diff --git a/clang-tools-extra/test/clang-tidy/.clang-tidy b/clang-tools-extra/test/clang-tidy/.clang-tidy
new file mode 100644
index 0000000000000..612bd0ee8de8a
--- /dev/null
+++ b/clang-tools-extra/test/clang-tidy/.clang-tidy
@@ -0,0 +1 @@
+Checks: '-*'

@llvmbot
Copy link
Member

llvmbot commented Dec 7, 2025

@llvm/pr-subscribers-clang-tidy

Author: Baranov Victor (vbvictor)

Changes

When working on tests, clangd with option --clang-tidy will report warnings from "root" clang-tidy config.
I believe these warnings serve no purpose in tests, so we better disable them.


Full diff: https://github.com/llvm/llvm-project/pull/171029.diff

1 Files Affected:

  • (added) clang-tools-extra/test/clang-tidy/.clang-tidy (+1)
diff --git a/clang-tools-extra/test/clang-tidy/.clang-tidy b/clang-tools-extra/test/clang-tidy/.clang-tidy
new file mode 100644
index 0000000000000..612bd0ee8de8a
--- /dev/null
+++ b/clang-tools-extra/test/clang-tidy/.clang-tidy
@@ -0,0 +1 @@
+Checks: '-*'

@zeyi2
Copy link
Member

zeyi2 commented Dec 7, 2025

This is mostly just a hypothesis for now.

I think the Windows build fails because clang-tools-extra/test/clang-tidy/infrastructure/Inputs/param/parameters.txt incorrectly uses single quotes for the -checks argument.

On Windows, the argument is parsed as a check named ' -*,llvm-namespace-comment ', which matches no existing checks, so no checks are enabled via the command line.

Previously, the test passed because it fell back to the root .clang-tidy configuration which enables llvm-*.

I opened #171033 to fix this. @vbvictor can you try manually applying the fix to parameters.txt and see whether the test passes?

@EugeneZelenko
Copy link
Contributor

Will be good idea to change commit summary to end with to silent warnings in IDE.

@vbvictor vbvictor changed the title [clang-tidy][NFC] Add empty .clang-tidy in tests to warnings in ide [clang-tidy][NFC] Add empty '.clang-tidy' file in tests dir to silent warnings in IDE Dec 7, 2025
@vbvictor
Copy link
Contributor Author

vbvictor commented Dec 7, 2025

Will be good idea to change commit summary to end with to silent warnings in IDE.

Yes, also missed that my title was bad initially.

@vbvictor vbvictor merged commit 3d24efd into llvm:main Dec 8, 2025
10 checks passed
@vbvictor vbvictor deleted the acp/vbvictor/8795286390186298 branch December 8, 2025 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants