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
Unknown Object (File)
Sat, Nov 23, 7:27 AM
Unknown Object (File)
Fri, Nov 22, 12:07 AM
Unknown Object (File)
Tue, Nov 19, 7:41 PM
Unknown Object (File)
Fri, Nov 15, 6:46 PM
Unknown Object (File)
Tue, Nov 12, 6:33 AM
Unknown Object (File)
Thu, Nov 7, 5:47 PM
Unknown Object (File)
Oct 23 2024, 9:50 PM
Unknown Object (File)
Oct 21 2024, 3:17 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).