After running auto-gen-config for a repository that has errors for RuboCop::Cop::Style::ConditionalAssignment I expect it to add those particular errors to the rubocop_todo.yml
Those errors are not added to the todo.yml
Run rubocop --auto-gen-config against a repository that has RuboCop::Cop::Style::ConditionalAssignment errors
$ rubocop -V
0.48.0 (using Parser 2.4.0.0, running on ruby 2.2.1 x86_64-darwin14)
I believe this is the same as #4142. Have you been able to isolate an example under which this happens @kyprifog? It seems to work for some files, but not for others, and we're trying to figure out what differs between them. Any input could be valuable. 馃檪
Ahh, good catch thanks. I haven't noticed any pattern, it appears to be every instance of that violation but I could be wrong. If I get a chance I'll try to debug later.
@kyprifog @Drenmi I faced the similar issue.
Running rubocop --auto-gen-config didn't include all the files in todo.
And so on running rubocop I got some offenses.
Style/ConditionalAssignment is one of those cops that depend on Metrics/LineLength, which I guess is the source of the trouble with --auto-gen-config. The problem is that the current settings in .rubocop_todo.yml are not taken into account when regenerating the file. Thus Metrics/LineLength: Max is 80, which can cause some offenses to go away. I'm trying to come up with a solution that runs --auto-gen-config in several phases. Nothing finished yet.
I'm pretty sure this was solved by #4985. @kyprifog Please open again if the problem is still reproducible on latest gem version or master.