From 17aff11dd43c6163966ad6f864db7195f390604f Mon Sep 17 00:00:00 2001 From: Paul LeMarquand Date: Mon, 28 Oct 2024 16:28:58 -0400 Subject: [PATCH] Add support for .js/.ts files to licence check This helps support vscode-swift, written in TypeScript --- .github/workflows/scripts/check-license-header.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/scripts/check-license-header.sh b/.github/workflows/scripts/check-license-header.sh index e445cd8..86ecb53 100755 --- a/.github/workflows/scripts/check-license-header.sh +++ b/.github/workflows/scripts/check-license-header.sh @@ -59,6 +59,10 @@ while IFS= read -r file_path; do swift) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; h) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; c) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; + js) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; + jsx) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; + ts) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; + tsx) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;; sh) expected_file_header=$(cat <(echo '#!/bin/bash') <(sed -e 's|@@|##|g' <<<"${expected_file_header_template}")) ;; ps1) expected_file_header=$(sed -e 's|@@|##|g' <<<"${expected_file_header_template}") ;; kts) expected_file_header=$(sed -e 's|@@|//|g' <<<"${expected_file_header_template}") ;;