Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: add option to list all available lint rules #274

Open
duaraghav8 opened this issue Sep 15, 2019 · 0 comments
Open

CLI: add option to list all available lint rules #274

duaraghav8 opened this issue Sep 15, 2019 · 0 comments
Labels

Comments

@duaraghav8
Copy link
Owner

This is just an initial though, anyone is welcome to participate in this thread. Only once the format is finalised will I add this to Milestone.

Description
A user shouldn't have to head to the docs to view a list of rules (along with detailed description, parameters supplied, autofix availability). The CLI should allow this.

Use case
Much faster & more convenient for user because they don't have to switch windows (think ultra lazy). More convenient for maintainers because they don't have to worry about keeping docs in sync with state of rules any more. The CLI uses code to extract all necessary info from rules and displays the list.

Screenshots
N/A

Alternatives
Documentation - List of rules (different docs for core linter and different plugins)

Comments
Proposed usage, keeping in mind that a user might like to list

  • all core lint rules
  • rules from an installed plugin like security
  • rules from a rule set such as solium:recommended
# List all rules of core linter
solium --list-rules

# List rules from a rule set
solium --list-rules --rulesets recommended

# List rules from 1 or more plugins
# Specifying --plugins means the core rules will not be displayed
solium --list-rules --plugins security,foobar

The output should be in a tabular form, just like in the docs

No.   Name                  Description                                           Arguments        Autofix available
1 .  `error-reason`   Provide reason message in `error()`                         {..}              `True`
2.      ...
@duaraghav8 duaraghav8 added the Hacktoberfest Hacktoberfest 2019 label Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant