Skip to content

Commit

Permalink
fixup! [Fix rubocop#1410] Make registered cops aware of `AllCops: Mig…
Browse files Browse the repository at this point in the history
…ratedSchemaVersion`
  • Loading branch information
koic committed Jan 14, 2025
1 parent 11321b8 commit 2caf790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/rails/migration_file_skippable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def self.apply_to_cops!
def already_migrated_file?
return false unless migrated_schema_version

match_data = File.basename(processed_source.file_path).match(/(?<timestamp>\d{14})/)
match_data = File.basename(processed_source.file_path).match(%r|migrate/*/*(?<timestamp>\d{14})|)
schema_version = match_data['timestamp'] if match_data

return false unless schema_version
Expand Down

0 comments on commit 2caf790

Please sign in to comment.