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

Sync config generation CLI options with Rubocop #388

Open
nschonni opened this issue Mar 15, 2023 · 0 comments
Open

Sync config generation CLI options with Rubocop #388

nschonni opened this issue Mar 15, 2023 · 0 comments

Comments

@nschonni
Copy link
Contributor

Here is the current --help from Rubocop 1.48.0

Config Generation:
        --auto-gen-config            Generate a configuration file acting as a
                                     TODO list.
        --regenerate-todo            Regenerate the TODO configuration file using
                                     the last configuration. If there is no existing
                                     TODO file, acts like --auto-gen-config.
        --exclude-limit COUNT        Set the limit for how many files to explicitly exclude.
                                     If there are more files than the limit, the cop will
                                     be disabled instead. Default is 15.
        --no-exclude-limit           Do not set the limit for how many files to exclude.
        --[no-]offense-counts        Include offense counts in configuration
                                     file generated by --auto-gen-config.
                                     Default is true.
        --[no-]auto-gen-only-exclude Generate only Exclude parameters and not Max
                                     when running --auto-gen-config, except if the
                                     number of files with offenses is bigger than
                                     exclude-limit. Default is false.
        --[no-]auto-gen-timestamp    Include the date and time when the --auto-gen-config
                                     was run in the file it generates. Default is true.
        --[no-]auto-gen-enforced-style
                                     Add a setting to the TODO configuration file to enforce
                                     the style used, rather than a per-file exclusion
                                     if one style is used in all files for cop with
                                     EnforcedStyle as a configurable option
                                     when the --auto-gen-config was run
                                     in the file it generates. Default is true.

A few of the ones I've seen as helpful

  • --regenerate-todo Reads the line from the top of the config to re-run with the same options. Currently this wouldn't really apply except for the current --auto-gen-exclude-limit which isn't currently written to that string today (0.45)
  • --[no-]auto-gen-timestamp reduces the git noise when regenerating the file if there is not changes
  • --exclude-limit, currently named --auto-gen-exclude-limit in haml-lint. --no-exclude-limit is just an extreme version of this one
  • --[no-]offense-counts, similar to the timestamp, it can be useful in reducing source control noise if you don't care about the shrinking/growning number.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants