Page MenuHomePhabricator

How can I make arc lint with rubocop output patches?
Closed, ResolvedPublic

Asked by getaaron on Mar 16 2016, 4:13 PM.


I have arc lint configured with rubocop:

$ arc linters
 AVAILABLE   ruby (Ruby)
 CONFIGURED  rubocop (Ruby static code analyzer)
 AVAILABLE   script-and-regex (Script and Regex)
(Run `arc linters --verbose` for more details.)

I tried running with --amend-all and got some suggestions that I think should be auto-fixable. For example:

$ arc lint --amend-all file.rb

>>> Lint for file.rb:

   Warning  (Style/StringLiterals) RuboCop
    Prefer single-quoted strings when you don't need string interpolation or
    special symbols.

    >>>        4   describe "invitation" do

But no changes are applied. The repo is under git source control.

How can I make arc lint apply a patch?


Updated 3,043 Days Ago

That's a feature of the linter driver, and the Rubocop driver ( doesn't implement it.

To implement, you need to call setOriginalText() and setReplacementText() on the message object with the appropriate patch.

New Answer


This question has been marked as closed, but you can still leave a new answer.