Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix line number for empty file offense
An offense added by a cop to an empty file with have line number = 1. For example: ```ruby RSpec.describe RuboCop::Cop::Style::Copyright, :config do context 'when the source code file is empty' do it 'registers an offense' do expect_offense('^ Include a copyright notice matching [...]') end end end ``` Ensure the line number matches for `expect_offense` on an empty file.
- Loading branch information