Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,42 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Disabling Cops

You can disable specific cops in several ways:

### Disable a cop for a specific file

Use inline comments at the top of the file:
```ruby
# rubocop:disable Neeto/DirectEnvAccess

class ApiClient
def initialize
@api_key = ENV['API_KEY']
end
end

# rubocop:enable Neeto/DirectEnvAccess
```

### Disable a cop for a specific block

Wrap the code with disable/enable comments:
```ruby
# rubocop:disable Neeto/DirectEnvAccess
api_key = ENV['API_KEY']
secret = ENV['SECRET_TOKEN']
# rubocop:enable Neeto/DirectEnvAccess
```

### Disable a cop for a single line

Add an inline comment at the end of the line:
```ruby
api_key = ENV['API_KEY'] # rubocop:disable Neeto/DirectEnvAccess
```

## Contributing

Bug reports and pull requests are welcome.
Expand Down
Loading