-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readability-identifier-naming
reports nothing but does something when no CheckOptions
are provided
#58096
Comments
@llvm/issue-subscribers-clang-tidy |
The check is among the heaviest so it not doing anything is rather bad (the
|
It looks like the performance issue was resolved in LLVM 17: LLVM 16
LLVM 17
LLVM 18
|
clang-tidy built from today's 195ba45, for https://github.com/zufuliu/notepad2/blob/main/scintilla/src/Editor.cxx with https://github.com/zufuliu/notepad2/blob/main/.clang-tidy: with
without
|
@zufuliu older clang-tidy also take so long, or you just tested latest ? |
tested latest built from today's main. |
@PiotrZSL should I create a different issue for the performance problem (regression from 18.1.5), following are results with
|
I don't think that this need separate issue. This issue originally was only about readability-identifier-naming searching for .clang-tidy config files in other locations, and that's why initially this check were heavy. To be honest when overall performance can be still improved for this check. This issue (#58096) cannot be fully fixed, as that's per check design. So cost of check will never be close to 0. Currently I need to be able to reproduce issue locally, preferably on ubuntu. |
following steps (based on command line https://github.com/zufuliu/notepad2/blob/main/scintilla/tidy.bat) may be able to reproduce the regression on Ubuntu: # see https://sourceforge.net/p/scintilla/code/ci/default/tree/ for Read Only access
hg clone http://hg.code.sf.net/p/scintilla/code scintilla
cd scintilla/src
clang-tidy --enable-check-profile -checks=readability-identifier-naming Editor.cxx -- -std=c++20 -I../include 1>tidy.log |
@zufuliu Whats causing a slowdown in this check is actually an harddrive: Check is trying to get "realpath" for every finding. |
performance regression indeed fixed by the PR:
|
Maybe the documentation can be improved by stating that you need to explicitly specify the naming you want to apply with an additional note that you can disable it if if do not use it. Or is it possible for the check to detect if any configuration is actually specified (well - it has to because somehow it decides to report something or nothing) and bail out? |
#57527 (comment) indicates that
readability-identifier-naming
is one of the heavier clang-tidy checks. But it seems that it doesn't do anything until you actually provideCheckOptions
.Running
-dump-config
only shows the following default values:The text was updated successfully, but these errors were encountered: