Closed kindoflew closed 3 years ago
Maybe running bundle exec standardrb
it shows the lines with the problems?
also, I think we should use a fixed version of standardrb and RuboCop, so we don't have this issue every time those are updated and we do update them manually on purpose to prevent these problems when needed
bundle exec standardrb
output a bunch of style
violations, but none of the ones listed in the above error message. They were almost all about using double-quoted strings.
hey @etagwerker, do you remember the reason to ignore the Gemfile.lock here? https://github.com/fastruby/dotenv_validator/commit/ce918f1fbec3caee1893e9ab595ab624ea019aaa
maybe it's better to add the .lock file so everybody uses the same versions of rubocop/standardrb to prevent newer versions adding newer cops to make it fail?
@arielj Last I remember it is not a best practice to add the Gemfile.lock to repositories of libraries? I think @bronzdoc might have more info about this.
I think we should use a fixed version of standardrb and RuboCop
I think this is the best way to go to avoid this issue in the future. ☝️
@arielj i'll close #41 then? The eventual PR to add fixed versions will probably involve enabling/disabling what new cops we want and will resolve this issue as well.
i could also open a new issue for adding those fixed versions so we can keep track of it.
Before we start...:
Version, Branch, or Commit: I made my own local branch, but confirmed with Francois that the issue is also happening on main.
Expected behavior: When commiting changes, RuboCop should only fail when it is supposed to (as per config).
Actual behavior: RuboCop fails because of 'unexpected output' to overcommit. There is a message from RuboCop detailing new cops that have not been configured yet, which seems to trip up overcommit.
Steps to reproduce:
How do I achieve this behavior? Use the following format to provide a step-by-step guide:
Step 1: Clone repo Step 2: Run setup script (ensure both
overcommit
andrubocop
are installed) Step 3: Make changes and commit.Context and environment: I found some relevant (but old) issues while trying to solve: sds/overcommit#704 rubocop/rubocop#7731
One fix recommended in the linked
overcommit
issue is to add--disable-pending-cops
toRuboCop.flags
in the config.Provide any relevant information about your setup (Customize the list accordingly based on what info is relevant to this project)
Logs
I will abide by the code of conduct