Skip to content

Commit

Permalink
[CI] License header support .in and .cmake files
Browse files Browse the repository at this point in the history
# Motivation

Some of repos have `.in` and `.cmake` files including header license comments.

# Modification

This PR adds support to the license check for those type of files.

# Result

Even more license headers.
  • Loading branch information
FranzBusch committed Sep 6, 2024
1 parent ff9492c commit 0146533
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/check-license-header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ while IFS= read -r file_path; do
sh) expected_file_header=$(cat <(echo '#!/bin/bash') <(sed -e 's|@@|##|g' <<<"${expected_file_header_template}")) ;;
py) expected_file_header=$(cat <(echo '#!/usr/bin/env python3') <(sed -e 's|@@|##|g' <<<"${expected_file_header_template}")) ;;
rb) expected_file_header=$(cat <(echo '#!/usr/bin/env ruby') <(sed -e 's|@@|##|g' <<<"${expected_file_header_template}")) ;;
in) expected_file_header=$(sed -e 's|@@|##|g' <<<"${expected_file_header_template}") ;;
cmake) expected_file_header=$(sed -e 's|@@|##|g' <<<"${expected_file_header_template}") ;;
*) fatal "Unsupported file extension for file (exclude or update this script): ${file_path}" ;;
esac
expected_file_header_linecount=$(wc -l <<<"${expected_file_header}")
Expand Down

0 comments on commit 0146533

Please sign in to comment.