Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
--init
option to rubocop
command
This PR adds `--init` option to `rubocop` command. ```console % mkdir example % cd /tmp/example % rubocop --init Writing new .rubocop.yml to /private/tmp/example/.rubocop.yml % cat .rubocop.yml # The behavior of RuboCop can be controlled via the .rubocop.yml # configuration file. It makes it possible to enable/disable # certain cops (checks) and to alter their behavior if they accept # any parameters. The file can be placed either in your home # directory or in some project directory. # # RuboCop will start looking for the configuration file in the directory # where the inspected file is and continue its way up to the root directory. # # See https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md % rubocop --init # A warning will occur when .rubocop.yml already exists .rubocop.yml already exists at /private/tmp/example/.rubocop.yml ``` It may be good to add a simple commented examples of basic configuration in the future. First of all, this PR aims to generate .rubocop.yml which contains the following configuration URL. https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md And the generated .rubocop.yml text is quoted from the above URL.
- Loading branch information
Showing
6 changed files
with
80 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters