[cfe-dev] [clang-tidy] Dealing with check names

Piotr Padlewski via cfe-dev cfe-dev at lists.llvm.org
Mon Dec 12 10:49:44 PST 2016


2016-12-12 19:20 GMT+01:00 Eugene Zelenko <eugene.zelenko at gmail.com>:

> Cześć, Piotr!
>
> On Mon, Dec 12, 2016 at 7:02 AM, Piotr Padlewski
> <piotr.padlewski at gmail.com> wrote:
> > Hi,
> > as clang-tidy grows there are more and more checks. One of the problem I
> see
> > is that "misc" check group is not user friendly - there are many checks
> that
> > do so many different things that usually user don't want to enable whole
> > group.
> > Other groups like modernize, performance, google, cert, boost, llvm
> doesn't
> > have this problem. Naturally the solution would be to split the group
> into
> > smaller groups that would mean more.
> > The problem is that we should not change names because old configs will
> not
> > work.
> >
> > Do you have some ideas how we could fix it, so we could make it easier
> for
> > users to use it?
> >
> > Other feature that we could add if we would know how to solve it is that
> we
> > could make new groups that would mostly have aliases to other checks.
> This
> > might be specially useful for cert checks - the cert code names doesn't
> tell
> > anything, so it would be good to have these checks with proper name in
> > different group so normal user could see what this check is doing from
> name
> > and CERT users could run checks with cert group as it was before.
> >
> >
> > One solution that I see is to reserve old name and make redirection, and
> > maybe output warning about deprecated name when user would use special
> flag
> > (e.g. verbose)
> >
> > What do you think about this problem?
> >
> > Piotr
>
> It's really good idea to split misc checks!
>
> My suggestions:
>
> I think it’ll be good idea to move unused checks to Clang, but will
> this be easy? Clang has warnings for unused variables, static
> functions and macros already. GCC has warning for unused parameters.
>
> misc-unused-alias-decls
> misc-unused-parameters
> misc-unused-raii
> misc-unused-using-decls
>
> Or maybe it should be in one check with options? Maybe only
misc-unused-parameters is different enough to have special option to
disable it.


> misc-inefficient-algorithm should be moved to performance. I tried to
> do this in past, but my patch was not perfect.
>
> Probable we should create next check groups:
>
> Potential memory issues:
>
> misc-use-after-move
>
> Preprocessor:
>
> misc-macro-parentheses
> misc-macro-repeated-side-effects
> misc-multiple-statement-macro
>
> Casts:
>
> misc-bool-pointer-implicit-conversion
> misc-incorrect-roundings
> misc-misplaced-widening-cast
>
> The reset sounds good!


> Eugene.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20161212/d538efd6/attachment.html>


More information about the cfe-dev mailing list