Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
inherit_gem:
  bixby: bixby_default.yml

Customizing the Configuration

You can override any configuration provided by Bixby in your app’s .rubycop.yml file. See the List of Cops and Configuration documentation in the References list below. Also, see the Bixby gem files listed above to see examples in use.

References:

Running RuboCop

Validate all files:

Code Block
rubocop

Validate a specific file:

Code Block
rubocop path/to/your/file

Autocorrect problems

If RuboCop finds style violations, you can ask it to try automatically fixing them.

Note

We recommend committing all work prior to running this command as sometimes RuboCop will create breaking changes.

Auto-fix all files:

Code Block
rubocop -a

Ignoring errors

Info

It is recommended that all errors reported by RuboCop be fixed.

But there are situations when this is not possible. In those cases, the following recommendations apply. These should be applied in priority order with the first being the preferred method.

  1. If the error applies to anything smaller than the full class or module, use inline comments to ignore the error. Disabling Cops within Source Code.

  2. Put class or module level error exceptions in .rubocop.todo.yml. Including/Excluding files

  3. Only if you are sure the error will never be fixed should the exception go in .rubocop.yml. The syntax for excluding files is the same for .rubocop.todo.yml and rubodo.yml.

...