mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2025-03-13 17:22:30 +01:00
license-header.rb: Don't read UTF-8 BOM as text when checking headers
This commit is contained in:
parent
cb9406f6a3
commit
26ce7e4f28
@ -18,7 +18,7 @@ print 'Checking files...'
|
|||||||
issue_files = []
|
issue_files = []
|
||||||
branch_changed_files.each do |file_name|
|
branch_changed_files.each do |file_name|
|
||||||
if file_name.end_with?('.cpp', '.h', '.kt', '.kts') and File.file?(file_name)
|
if file_name.end_with?('.cpp', '.h', '.kt', '.kts') and File.file?(file_name)
|
||||||
file_content = File.read(file_name)
|
file_content = File.read(file_name, mode: 'r:bom|utf-8')
|
||||||
if not file_content.start_with?(license_header)
|
if not file_content.start_with?(license_header)
|
||||||
issue_files.push(file_name)
|
issue_files.push(file_name)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user