[llvm-dev] Highlighting trailing whitespaces on Phab?

Eric Liu via llvm-dev llvm-dev at lists.llvm.org
Thu Nov 17 07:18:13 PST 2016


I also like the bot solution better.

Phabricator do provide API for adding comments to a revision:
https://reviews.llvm.org/conduit/method/differential.createcomment/

I'm not familiar with the bot setup though... wondering who's the right
person to contact for this?

On Thu, Nov 17, 2016 at 12:01 AM Johannes Doerfert via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hey Mehdi, Hey Matthias,
>
> On 11/16, Matthias Braun wrote:
> > I assume those arc linters run on the client side? And people need to
> have the various tools installed before all of that works?
> Yes they run client side but there are no "tools" needed except
> arcanist (we talk about arcanist linters after all).
>
> Here is the .arclint file in the Polly repo:
> {
>   "linters": {
>     "format": {
>       "include": "(include/polly/.+\\.h$|lib/.+\\.cpp$)",
>       "exclude": "(lib/JSON/.*)",
>       "type": "script-and-regex",
>       "script-and-regex.script": "sh -c './utils/check_format.sh \"$0\" 2>
> /dev/null || true'",
>       "script-and-regex.regex": "/^(OK:(?P<ignore>.+)|Error:)
> (?P<message>.+)$/m"
>     },
>     "chmod": {
>       "type": "chmod"
>     },
>     "filename": {
>       "exclude": "(www/experiments/.+|.*\\.jscop.*)",
>       "type": "filename"
>     },
>     "merge-conflict": {
>       "type": "merge-conflict"
>     },
>     "spelling": {
>       "exclude": "(configure|autoconf/.*)",
>       "type": "spelling"
>     }
>   }
> }
>
> We, or better me at some point, used various linters provided by arcanist
> and
> one custom "script-and-regex" linter based on the check_format.sh script
> that
> wraps clang-format. While it is apparently not present in the repository
> anymore [-.-], we used it at some point in the Polly tests ("check-polly")
> and
> the buildbots to verify the source formatting.
>
> > Just to throw out another idea: Running a linter on the server side and
> let it comment on phab reviews would be the perfect project to get some
> experience with pre-commit testing/hooks for llvm :)
> To be honest I would prefer a server side solution or a bot as the clients
> will not converge on one way of submitting patches (for review) anyway.
>
> --
>   Johannes
>
> > > On Nov 16, 2016, at 9:14 AM, Mehdi Amini via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
> > >
> > > Why isn’t it in the LLVM repo?
> We could port the linter as well as the test execution engine to llvm if
> you like. For the latter I started a discussion once but it did just
> fade away...
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161117/99ff2ac3/attachment.html>


More information about the llvm-dev mailing list