Skip to content

Commit

Permalink
More on add_gpl_license.py
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengtuggy committed Jan 12, 2025
1 parent b190a3d commit 3661303
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions script/add_gpl_license.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ def remove_license_header(filepath: Path) -> None:
if first_line.startswith('#!'):
output_file.write(first_line)

# Handle the line that a few of our C++ source files have at or near the top that looks like this:
# // -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
elif first_line.startswith('// -*- '):
output_file.write(first_line)

# If first line isn't a comment, then short-circuit this whole process. There is no comment block to delete
elif not is_a_comment(first_line, comment_type):
output_file.close()
Expand Down

0 comments on commit 3661303

Please sign in to comment.