[PATCH] D13444: [clang-tidy] Clocky module and multiple check from my repository

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 6 09:52:59 PDT 2015


Splinting a patch into separate check it's not a problem. I have organized
commits in that way.

About a 'author' in name, organization is also a author, so clocky is a
'one man organization' :D.

It's much more simple, I have no benefits in 'anonymous' contribution, in
that case I would rather go into separate project.
>From a user-point of view, i'm sure that no-one would like to see 'clocky',
'google', 'llvm' in a compiler output, and I agree with that.
But on file level it's much more easier to organize checks in that way, as
I't keep author more responsible for own checkers.

For future my proposal could be:
- leave files/folders name as they are
- add a check 'tag' engine:

So output from --list-checks-ex could be:
Module         Check-name                                Tags
google          explicit-constructor
 [reliability, security]
clocky           inefficient-container-insert              [performance,
c++11]

In this way, user would be able to run check in few ways:
clocky-inefficient-container-insert,
performance-inefficient-container-insert, c++11-inefficient-container-insert,
c++11-performance-inefficient-container-insert, inefficient-container-insert,
in short any combination of tags would be accepted. But it would select a
check that have all tags.
And a name that user used to enable check would show up in warning, a
default would be a first tag name performance-inefficient-container-insert,
if not available then module name.
Also user would be able to enable all check from specific tag like
--checks= "-*, performance"., or pair of tags --checks="performance-c++11"
to enable all checks that are c++11 performance checks.
A output from --list-checks would be a list of default names.

In that way no new 'modules' would need to be created to tag a checks (
cert-*).
Tests still would use a module name as prefix and in file names.
Module could be also printed as a tag, instead of separate column.
Checks names would need to be unique.

Right now documentation of clang-tidy checks is poor, some template should
be used.
Now I see that some of checks are duplicated in both google and misc
module, that also would need to be resolved out.

Thats, just my ideas...

2015-10-06 17:50 GMT+02:00 Aaron Ballman <aaron.ballman at gmail.com>:

> On Tue, Oct 6, 2015 at 8:56 AM, Piotr Zegar <piotrzsl at gmail.com> wrote:
> > ClockMan abandoned this revision.
> > ClockMan added a comment.
> >
> > As a 'corporation' in which I work has doubts that checks developed by
> my after work, but tested on copyright protected code should be released to
> public under my 'name'. I will drop "push request", until everything will
> clarify.
>
> I look forward to seeing a new patch at some point. I agree with
> Eugene that any future patch should be split out into distinct patches
> that focus on just one check at a time.
>
> > As for author name in module: For me is a: must-have, as I plan to
> extend these checks and develop more.
> > As a author name in check name: I'm thinking about some "tags", so check
> could be registered under multiple names: clocky-object-copy-in-range-for
> and performance-object-copy-in-range-for.
>
> I would be opposed to using an author name in anything that is
> user-facing. We group the checkers either by functionality
> ("modernize-*" and "readability-*"), by organizational name
> ("google-*" and "llvm-*"), or by publication name ("cert-* and
> "cppcoreguidelines-*"). We actively discourage use of author names
> even in our code comments.
>
> ~Aaron
>
> >
> > Best regards,
> > Clocky
> >
> >
> > Repository:
> >   rL LLVM
> >
> > http://reviews.llvm.org/D13444
> >
> >
> >
>



-- 
inż. Piotr Zegar
me at piotrzegar.pl
http://www.piotrzegar.pl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151006/df1b3c46/attachment-0001.html>


More information about the cfe-commits mailing list