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
F13186311: D9062.diff
Sat, May 11, 3:33 AM
Unknown Object (File)
Tue, May 7, 7:40 AM
Unknown Object (File)
Tue, May 7, 5:34 AM
Unknown Object (File)
Fri, May 3, 3:38 AM
Unknown Object (File)
Mon, Apr 29, 2:48 PM
Unknown Object (File)
Wed, Apr 24, 10:15 PM
Unknown Object (File)
Apr 19 2024, 3:29 PM
Unknown Object (File)
Apr 11 2024, 8:37 AM
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).