Hey Nicolás Thanks for reporting this.
Since RuboCop configuration varies from project to project, it would be impossible to come up with a template that would fit all the style combinations. Do you think it makes sense to adjust the template in rspec-rails (I suggest it's coming from it) to appease the default RuboCop/RuboCop-RSpec configurations? If one's project's RuboCop configuration is non-default, I believe it would be possible to override the templates in your project. This makes most sense if you actively use scaffolds. Also, there's an option in `rubocop` to `--auto-correct` all the offences. I've seen people using scripts to also pass a list of files in the git working tree to `rubocop` and reduce its auto-correction to only this set of files. - Phil On Wed, Oct 23, 2019 at 12:52 PM Nicolás Alonso <[email protected]> wrote: > **Is your feature request related to a problem? Please describe.** > After a scaffold with `rails g scaffold Post name short_description > large_description:text position:integer` then i run `rubocop --parallel` > and found a lot of offenses. > > I have identified: > - Layout/EmptyLinesAroundBlockBody > - Layout/EmptyLines > - Style/BlockDelimiters > - Layout/SpaceInsideHashLiteralBraces > - Style/HashSyntax > - Layout/IndentFirstArgument > - Layout/IndentFirstArrayElement > - Style/StringLiterals > - FrozenStringLiteralComment > > > **Describe the solution you'd like** > I would like that the generated files don't have rubocop offenses > > **Describe alternatives you've considered** > I have considered turning off some crops but i think is not the way. > > I have some time to do this, if you are ok i'll start in the order that i > have mentioned the offenses. > Which branch should be my base? I think that some offenses can be from > version 3 and other ones like `Style/HashSyntax` needs to be from master > > **Additional context** > rails: 5.2.3 > ruby: 2.6.5 > rspec-rails 4.0.0.pre > > > > -- > You received this message because you are subscribed to the Google Groups > "rspec" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rspec/748e8a6c-7496-4914-b43e-1cca47bb0be0%40googlegroups.com > <https://groups.google.com/d/msgid/rspec/748e8a6c-7496-4914-b43e-1cca47bb0be0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/CAAk5Ok9hQREpYviwMC8Np_g0dXFMaoFXoQaP5NSLpEV71NhmxA%40mail.gmail.com.
