<div dir="ltr">I also like the bot solution better.<div><br></div><div>Phabricator do provide API for adding comments to a revision: <a href="https://reviews.llvm.org/conduit/method/differential.createcomment/">https://reviews.llvm.org/conduit/method/differential.createcomment/</a></div><div><br></div><div>I'm not familiar with the bot setup though... wondering who's the right person to contact for this?</div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 17, 2016 at 12:01 AM Johannes Doerfert via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey Mehdi, Hey Matthias,<br class="gmail_msg">
<br class="gmail_msg">
On 11/16, Matthias Braun wrote:<br class="gmail_msg">
> I assume those arc linters run on the client side? And people need to have the various tools installed before all of that works?<br class="gmail_msg">
Yes they run client side but there are no "tools" needed except<br class="gmail_msg">
arcanist (we talk about arcanist linters after all).<br class="gmail_msg">
<br class="gmail_msg">
Here is the .arclint file in the Polly repo:<br class="gmail_msg">
{<br class="gmail_msg">
  "linters": {<br class="gmail_msg">
    "format": {<br class="gmail_msg">
      "include": "(include/polly/.+\\.h$|lib/.+\\.cpp$)",<br class="gmail_msg">
      "exclude": "(lib/JSON/.*)",<br class="gmail_msg">
      "type": "script-and-regex",<br class="gmail_msg">
      "script-and-regex.script": "sh -c './utils/check_format.sh \"$0\" 2> /dev/null || true'",<br class="gmail_msg">
      "script-and-regex.regex": "/^(OK:(?P<ignore>.+)|Error:) (?P<message>.+)$/m"<br class="gmail_msg">
    },<br class="gmail_msg">
    "chmod": {<br class="gmail_msg">
      "type": "chmod"<br class="gmail_msg">
    },<br class="gmail_msg">
    "filename": {<br class="gmail_msg">
      "exclude": "(www/experiments/.+|.*\\.jscop.*)",<br class="gmail_msg">
      "type": "filename"<br class="gmail_msg">
    },<br class="gmail_msg">
    "merge-conflict": {<br class="gmail_msg">
      "type": "merge-conflict"<br class="gmail_msg">
    },<br class="gmail_msg">
    "spelling": {<br class="gmail_msg">
      "exclude": "(configure|autoconf/.*)",<br class="gmail_msg">
      "type": "spelling"<br class="gmail_msg">
    }<br class="gmail_msg">
  }<br class="gmail_msg">
}<br class="gmail_msg">
<br class="gmail_msg">
We, or better me at some point, used various linters provided by arcanist and<br class="gmail_msg">
one custom "script-and-regex" linter based on the check_format.sh script that<br class="gmail_msg">
wraps clang-format. While it is apparently not present in the repository<br class="gmail_msg">
anymore [-.-], we used it at some point in the Polly tests ("check-polly") and<br class="gmail_msg">
the buildbots to verify the source formatting.<br class="gmail_msg">
<br class="gmail_msg">
> 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 :)<br class="gmail_msg">
To be honest I would prefer a server side solution or a bot as the clients<br class="gmail_msg">
will not converge on one way of submitting patches (for review) anyway.<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
  Johannes<br class="gmail_msg">
<br class="gmail_msg">
> > On Nov 16, 2016, at 9:14 AM, Mehdi Amini via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br class="gmail_msg">
> ><br class="gmail_msg">
> > Why isn’t it in the LLVM repo?<br class="gmail_msg">
We could port the linter as well as the test execution engine to llvm if<br class="gmail_msg">
you like. For the latter I started a discussion once but it did just<br class="gmail_msg">
fade away...<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
LLVM Developers mailing list<br class="gmail_msg">
<a href="mailto:llvm-dev@lists.llvm.org" class="gmail_msg" target="_blank">llvm-dev@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="gmail_msg">
</blockquote></div>