Is there any way to show guidemarks in the Differential Editor?


#1

It would be great if the Differential source code view could be configured to show “guidelines” to show a configurable maximum line length or even the indent positions

Here is a simple mockup of what I mean

This would be really useful rather than having to download a file to check it conforms to “max code guidelines”


#2

On our install we have linters or code formatters set up to check indenting and line length. This allows human reviews to focus on the content of the code instead of having to deal with formatting issues.


#3

Uploads of patches via the “Create Diff Web Page” and not via arcanist doesn’t run the linters (am I correct?)


#4

Those don’t run the linters, but you should maybe try to run a server-side “CI” process for them (Or maybe try to train the team to arc?)


#5

can arc linters publish comments/results into the reivew?,

if I have Phabricator fire a webhook to a CI system, and have it pull down the revision, can the CI system run arc lint and push the lint results back into the review?


#6

If you configure the CI, it can put lint errors (and failed tests) into the Differential - the upstream is configured like this, and that’s the expected way to integrate CI into Phabricator.
It is a little complicated - the short of it is "Herald starts Harbormaster, Harbormaster starts Jenkins, Jenkins calls conduit method harbormaster.sendmessage".
https://secure.phabricator.com/book/phabricator/article/harbormaster/ for the guide…


#7

So as I understand it there is no builtin support for arc lint to format and send that message back as inline comments into a Review/Diff PHID


#8

If your team creates diffs using arc, messages from arc lint will automatically be added as inline comments. See for example https://secure.phabricator.com/D20083#C343939NL1329


#9

If your team doesn’t use arc to create diffs, then you need to lint in CI - and sendmessage will show up in the UI in the same way as arc lint items does (In fact, arc lint is using sendmessage to report its issues).