Page MenuHomePhabricator

Provide `arc linters --verbose` to list all available options
ClosedPublic

Authored by epriestley on May 12 2014, 2:33 AM.
Tags
None
Referenced Files
F15410045: D9062.diff
Wed, Mar 19, 6:43 AM
F15409838: D9062.diff
Wed, Mar 19, 5:40 AM
F15409377: D9062.diff
Wed, Mar 19, 4:27 AM
F15409091: D9062.diff
Wed, Mar 19, 3:16 AM
F15408872: D9062.diff
Wed, Mar 19, 2:02 AM
F15408693: D9062.diff
Wed, Mar 19, 12:50 AM
F15408505: D9062.diff
Tue, Mar 18, 11:37 PM
F15408321: D9062.diff
Tue, Mar 18, 10:26 PM
Subscribers

Details

Summary

Ref T2039. I'll update the corresponding documentation.

It feels a little awkward that this is disconnected from getLinterConfigurationOptions(), but I dislike returning weird ad-hoc structures more than I dislike having two methods. Most linters don't implement either of these anyway.

Test Plan

Ran arc linters and arc linters --verbose.

Diff Detail

Repository
rARC Arcanist
Branch
docoptions
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 379
Build 379: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

epriestley retitled this revision from to Provide `arc linters --verbose` to list all available options.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: joshuaspence, btrahan.
epriestley added a task: Restricted Maniphest Task.
joshuaspence edited edge metadata.

I disagree with you, I think amending getLinterConfigurationOptions to return something like:

public function getLinterConfigurationOptions() {
  ...

  return array(
    'severity' => array(
      'type' => 'optional map<string|int, string>',
      'info' => pht(
        'Provide a map from lint codes to adjusted severity levels: error, '.
        'warning, advice, autofix or disabled.')
    'severity.rules' => array(
      'type' => 'optional map<string, string>',
      'info' => pht(
        'Provide a map of regular expressions to severity levels. All '.
        'matching codes have their severity adjusted.')
  );
}
This revision now requires changes to proceed.May 12 2014, 2:53 AM
epriestley edited edge metadata.
  • Return option specifications instead of spreading this across two methods.
  • Get rid of the nonsensical, badly named getInfoOptions().
joshuaspence edited edge metadata.

Much better :D

This revision is now accepted and ready to land.May 12 2014, 3:08 AM
epriestley updated this revision to Diff 21530.

Closed by commit rARC54c377448db8 (authored by @epriestley).