-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Fix #5188] Add --no-auto-gen-timestamp option #5358
Conversation
e500190
to
4fe365d
Compare
@@ -8,7 +8,7 @@ class DisabledConfigFormatter < BaseFormatter | |||
HEADING = | |||
['# This configuration was generated by', | |||
'# `%s`', | |||
"# on #{Time.now} using RuboCop version #{Version.version}.", | |||
"# %susing RuboCop version #{Version.version}.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New cop idea - string array followed by .join("\n")
should be replaced with a heredoc. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in most recent push
Apart from the failed build, the changes look good to me. |
9b78c4f
to
cca2f9c
Compare
An option to generate a `.rubocop_todo.yml` file that does not change unless there are substantive changes to its content. With this option and `--no-offence-counts` combined the `.rubocop_todo.yml` config should not change from run to run unless there are differences in the offences detected. This will allow developers to use automated `git diff` tests to check that the `.rubocop_todo.yml` is up-to-date. In `options.rb` the verification of the presence of `--auto-gen-config` when any of the three associated options is supplied has been consolidated. This ensures that handling of these parameters is consistent, and as a nice side-effect it allows us to remove the `args` parameter from a chain of methods right up to `define_options`.
cca2f9c
to
0a1aa82
Compare
👍 |
An option to generate a
.rubocop_todo.yml
file that does not change unless there are substantive changes to its content.With this option and
--no-offence-counts
combined the.rubocop_todo.yml
config should not change from run to run unless there are differences in the offences detected. This will allow developers to use automatedgit diff
tests to check that the.rubocop_todo.yml
is up-to-date.In
options.rb
the verification of the presence of--auto-gen-config
when any of the three associated options is supplied has been consolidated. This ensures that handling of these parameters is consistent, and as a nice side-effect it allows us to remove theargs
parameter from a chain of methods right up todefine_options
.Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).and description in grammatically correct, complete sentences.
rake default
orrake parallel
. It executes all tests and RuboCop for itself, and generates the documentation.