https://github.com/HerrCai0907 created
https://github.com/llvm/llvm-project/pull/96122
When clang-tidy get an empty checks, it will throw "no checks enabled" error
and exit with non-zero return value.
It make clang-tidy's wrapper program confused when in big project some files
don't want to be
llvmbot wrote:
@llvm/pr-subscribers-clang-tools-extra
@llvm/pr-subscribers-clang-tidy
Author: Congcong Cai (HerrCai0907)
Changes
When clang-tidy get an empty checks, it will throw "no checks enabled" error
and exit with non-zero return value.
It make clang-tidy's wrapper program confused
@@ -325,6 +325,14 @@ option is recognized.
)"),
cl::init(false), cl::cat(ClangTidyCategory));
+static cl::opt AllowEmptyCheckList("allow-empty-checks", desc(R"(
SimplyDanny wrote:
Should the option names be in sync?
```sugges
https://github.com/PiotrZSL edited
https://github.com/llvm/llvm-project/pull/96122
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -125,6 +125,9 @@ Improvements to clang-tidy
- Added argument `--exclude-header-filter` and config option
`ExcludeHeaderFilterRegex`
to exclude headers from analysis via a RegEx.
+- Added argument `--allow-empty-checks` and config option `AllowEmptyCheckList`
@@ -125,6 +125,9 @@ Improvements to clang-tidy
- Added argument `--exclude-header-filter` and config option
`ExcludeHeaderFilterRegex`
to exclude headers from analysis via a RegEx.
+- Added argument `--allow-empty-checks` and config option `AllowEmptyCheckList`
@@ -125,6 +125,9 @@ Improvements to clang-tidy
- Added argument `--exclude-header-filter` and config option
`ExcludeHeaderFilterRegex`
to exclude headers from analysis via a RegEx.
+- Added argument `--allow-empty-checks` and config option `AllowEmptyCheckList`
https://github.com/PiotrZSL requested changes to this pull request.
if a reason for this parameter is not to fail wrapper scripts, then maybe
run-clang-tidy.py / run-clang-tidy-diff.py should also be updated.
https://github.com/llvm/llvm-project/pull/96122
HerrCai0907 wrote:
> if a reason for this parameter is not to fail wrapper scripts, then maybe
> run-clang-tidy.py / run-clang-tidy-diff.py should also be updated.
Both of them is fine because they only count the failed file and don't do any
check about failure.
https://github.com/llvm/llvm-p
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/96122
>From 41993ea6903668c41eef8a4477f5914c894f7109 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Wed, 19 Jun 2024 23:20:09 +
Subject: [PATCH 1/2] [clang-tidy] add option to avoid "no checks enabled"
erro
https://github.com/5chmidti edited
https://github.com/llvm/llvm-project/pull/96122
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/5chmidti commented:
´run-clang-tidy.py` and `clang-tidy-diff.py` should probably expose an option
to enable this option via the script (maybe with an adjustment to the release
notes).
https://github.com/llvm/llvm-project/pull/96122
___
@@ -651,7 +659,7 @@ int clangTidyMain(int argc, const char **argv) {
return 0;
}
- if (EnabledChecks.empty()) {
+ if (EnabledChecks.empty() && !AllowNoChecks) {
llvm::errs() << "Error: no checks enabled.\n";
llvm::cl::PrintHelpMessage(/*Hidden=*/false, /*Cate
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/96122
>From 41993ea6903668c41eef8a4477f5914c894f7109 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Wed, 19 Jun 2024 23:20:09 +
Subject: [PATCH 1/3] [clang-tidy] add option to avoid "no checks enabled"
erro
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/96122
>From 41993ea6903668c41eef8a4477f5914c894f7109 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Wed, 19 Jun 2024 23:20:09 +
Subject: [PATCH 1/4] [clang-tidy] add option to avoid "no checks enabled"
erro
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/96122
>From 41993ea6903668c41eef8a4477f5914c894f7109 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Wed, 19 Jun 2024 23:20:09 +
Subject: [PATCH 1/5] [clang-tidy] add option to avoid "no checks enabled"
erro
https://github.com/SimplyDanny approved this pull request.
https://github.com/llvm/llvm-project/pull/96122
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/SimplyDanny edited
https://github.com/llvm/llvm-project/pull/96122
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -125,6 +125,9 @@ Improvements to clang-tidy
- Added argument `--exclude-header-filter` and config option
`ExcludeHeaderFilterRegex`
to exclude headers from analysis via a RegEx.
+- Added argument `--allow-no-checks` to suppress "no checks enabled" error
+ when disabling
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/96122
>From 41993ea6903668c41eef8a4477f5914c894f7109 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Wed, 19 Jun 2024 23:20:09 +
Subject: [PATCH 1/6] [clang-tidy] add option to avoid "no checks enabled"
erro
@@ -0,0 +1,5 @@
+// RUN: not clang-tidy %s -checks='-*'
+// RUN: clang-tidy %s -checks='-*' --allow-no-checks | FileCheck
--match-full-lines %s
+
+
+// CHECK: No checks enabled.
5chmidti wrote:
missing newline
https://github.com/llvm/llvm-project/pull/96122
___
5chmidti wrote:
the same should probably be done for `diff-clang-tidy.py`
https://github.com/llvm/llvm-project/pull/96122
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
HerrCai0907 wrote:
Where is `diff-clang-tidy.py`?
https://github.com/llvm/llvm-project/pull/96122
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
HerrCai0907 wrote:
I found it. It named `clang-tidy-diff.py`
https://github.com/llvm/llvm-project/pull/96122
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
https://github.com/HerrCai0907 edited
https://github.com/llvm/llvm-project/pull/96122
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 updated
https://github.com/llvm/llvm-project/pull/96122
>From 41993ea6903668c41eef8a4477f5914c894f7109 Mon Sep 17 00:00:00 2001
From: Congcong Cai
Date: Wed, 19 Jun 2024 23:20:09 +
Subject: [PATCH 1/8] [clang-tidy] add option to avoid "no checks enabled"
erro
https://github.com/5chmidti approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/96122
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/HerrCai0907 closed
https://github.com/llvm/llvm-project/pull/96122
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
28 matches
Mail list logo