Sha256: 353f6ac4401ff2e64f6a81595c9da51c60dd54b651c590c1c3a2c3c069a65896

Contents?: true

Size: 1.31 KB

Versions: 3

Compression:

Stored size: 1.31 KB

Contents

# DarkFinger

A Rubocop extension to check the layout of ActiveModel files. The cop will
check that elements appear together, in the right order, and commented as
desired.

Supported elements:

* associations
* attributes
* callbacks
* constants
* enums
* includes
* modules
* scopes
* validations
* class_methods
* instance_methods


## Installation

Add this line to your application's Gemfile:

```ruby
gem 'dark_finger'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install dark_finger

## Usage

Install the gem. Then, in your `.rubycop.yml` file, require `dark_finger` and
add your desired config.

For example, here is the default config:

```ruby
# in .rubocop.yml


# this is required
require: dark_finger

DarkFinger/ModelStructure:
  enabled: true
  required_order:
    - module
    - include
    - enum
    - constant
    - association
    - validation
    - scope
    - attributes
    - callback
    - class_method
    - instance_method
  required_comments:
    association: Relationships
    attribute: Attributes
    callback: Callbacks
    constant: Constants
    enum: Enums
    include: Includes
    module: Modules
    scope: Scopes
    validation: Validation

```

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dark_finger-0.1.3 README.md
dark_finger-0.1.2 README.md
dark_finger-0.1.1 README.md