Skip to content

Commit

Permalink
Suppress InternalAffairs/ProcessedSourceBufferName's offense
Browse files Browse the repository at this point in the history
This commit suppresses the following `InternalAffairs/ProcessedSourceBufferName`'s offense:

```console
$ bundle exec rake
(snip)

lib/rubocop/cop/rails/deprecated_active_model_errors_methods.rb:163:28: C: [Correctable] InternalAffairs/ProcessedSourceBufferName: Use file_path instead.
processed_source.buffer.name.include?('/models/')
                 ^^^^^^^^^^^

279 files inspected, 1 offense detected, 1 offense autocorrectable
```
  • Loading branch information
koic committed Feb 22, 2023
1 parent 81b0fdc commit e9bb19f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def receiver_matcher(node)
end

def model_file?
processed_source.buffer.name.include?('/models/')
processed_source.file_path.include?('/models/')
end
end
end
Expand Down

0 comments on commit e9bb19f

Please sign in to comment.