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
F14447825: D9062.diff
Thu, Dec 26, 2:35 PM
Unknown Object (File)
Mon, Dec 23, 4:32 AM
Unknown Object (File)
Sat, Dec 21, 3:10 AM
Unknown Object (File)
Wed, Dec 18, 12:07 AM
Unknown Object (File)
Mon, Dec 16, 8:35 AM
Unknown Object (File)
Thu, Dec 12, 4:05 AM
Unknown Object (File)
Sun, Dec 8, 11:12 PM
Unknown Object (File)
Sun, Dec 8, 2:20 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
Lint
Lint Skipped
Unit
Tests Skipped

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).