Skip to content

Commit

Permalink
fix add_license script in case where a file is just a license header
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed May 29, 2019
1 parent 6d23d52 commit 480ef6f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contrib/add_license_to_files.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ function add_license_line!(unprocessed::Vector, src::AbstractString, new_license
isempty(lines) && (push!(unprocessed, path); continue)
isempty(old_license) || check_lines!(path, lines, old_license, prefix, true)
check_lines!(path, lines, new_license, prefix, false)
isempty(lines) && continue # file consisting of just license header
# check shebang file
linenum = license_linenum(lines[1])
if !isempty(strip(lines[linenum]))
Expand Down

0 comments on commit 480ef6f

Please sign in to comment.