fastruby / dotenv_validator

This gem check if required env variables are present and its format using the .env and .env.sample files from Dotenv.
https://www.fastruby.io/blog/open-source/introducing-dotenv-validator.html
MIT License
50 stars 4 forks source link

disable new cops by default #41

Closed kindoflew closed 3 years ago

kindoflew commented 3 years ago

Closes #37.

Description: Added the following to .rubocop.yml:

AllCops:
  NewCops: disable

I went with disabling all new cops because it seemed like it would cause less surprising behavior than having commits potentially fail every time a new cop is added.

I will abide by the code of conduct.

kindoflew commented 3 years ago

@bronzdoc The issue that this is resolving is getting rid of the console message about new cops that was causing overcommit to fail.

Apparently, new cops added between major versions aren't enabled by default, they are in a special "pending" status (https://docs.rubocop.org/rubocop/versioning.html#pending-cops). This then causes the message to appear if they aren't manually enabled/disabled.

Should I switch this to NewCops: enable then? Or maybe explicitly decide on all the newer cops?

kindoflew commented 3 years ago

We could also pass --disable-pending-cops as a flag in .overcommit.yml. This way, the message is only suppressed during pre-commit checks, but if run manually, we would still see information about the new cops.