0
0
Fork 0

Fix Rails/RootPathnameMethods cop (#31582)

This commit is contained in:
Matt Jankowski 2024-08-26 03:35:07 -04:00 committed by GitHub
parent 5bcfe8d421
commit bcc4b1078c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 6 additions and 6 deletions

View file

@ -20,7 +20,7 @@ end
def find_used_icons
icons_by_weight_and_size = {}
Dir[Rails.root.join('app', 'javascript', '**', '*.*s*')].map do |path|
Rails.root.glob('app/javascript/**/*.*s*').map do |path|
File.open(path, 'r') do |file|
pattern = %r{\Aimport .* from '@/material-icons/(?<weight>[0-9]+)-(?<size>[0-9]+)px/(?<icon>[^-]*)(?<fill>-fill)?.svg\?react';}
file.each_line do |line|