Rails Best Practices

Web Sitehttps://rails-bestpractices.com/
LanguageRuby 2.4.2
Supported Version1.19.2

Getting Started

To start using Rails Best Practices, enable it in repository setting.

If you want some customization, add Rails Best Practices config file at config/rails_best_practices.yml.

Default Configuration

SideCI uses the following settings of Rails Best Practices if there is no config file in your repository.

Configuration via sideci.yml

Here are example settings for Rails Best Practices under rails_best_practices.

linter:
  rails_best_practices:
    options:
      vendor: false
      spec: true
      test: true
      features: true
      exclude: foo
      only: bar

options

This option controls command line options that are given to rails_best_practices.

vendor

This option controls whether to include files of vendor directory. When option is declared true, the vendor files will be inspected. The default value in SideCI is true.

spec

This option controls whether to include files of spec directory. When options is declared true, the spec files will be inspected. The default value in SideCI is false.

test

This option controls whether to include files of test directory. When options is declared true, the test files will be inspected. The default value in SideCI is false.

features

This option controls whether to include files of features directory. When options is declared true, the features files will be inspected. The default value in SideCI is false.

exclude

This option controls files/directories to exclude them from analysis. If you would like to set up multiple files/directories, write them as a comma separated list:

linter:
  rails_best_practices:
    options:
      exclude: app/controllers/foo/,app/models/bar.rb

only

This option manages files/directories to analyze. When this option is declared, SideCI analyzes only matching a pattern. If you would like to set up multiple files/directories, write them as a comma separated list:

linter:
  rails_best_practices:
    options:
      only: app/controllers/,app/models/,lib/foo.rb