Skip to content

aptible/dryer-lint

Repository files navigation

dryer-lint

Aptible's baseline Rubocop configuration.

Usage

This is meant to be inherited from via a remote URL, as described here.

For example, if you have a non-Rails app, your Rubocop configuration should look something like this:

inherit_from:
  - https://raw.githubusercontent.com/aptible/dryer-lint/main/.rubocop.base.yml

AllCops:
  TargetRubyVersion: 3.1
  NewCops: enable
  Include:
    - !ruby/regexp /\.rb$/
    - !ruby/regexp /Gemfile$/
    - !ruby/regexp /\.gemspec$/
    - !ruby/regexp /\.rake$/
    - !ruby/regexp /Rakefile$/

If you are using Rails, the only change to the above is that you should also include the Rails configuration in the inherit_from (AllCops stays the same as above):

inherit_from:
  - https://raw.githubusercontent.com/aptible/dryer-lint/main/.rubocop.base.yml
  - https://raw.githubusercontent.com/aptible/dryer-lint/main/.rubocop.rails.yml

Testing

A Docker Compose configuration is included to make testing locally easier. To test, run make init once then make rubocop. The same commands work in the rspec_3_plus/ directory as well.

The GitHub Action for this repository mimics this behavior.

You can also test on your system directly, without docker, with: make local-bundle-install and make local-rubocop

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors