diff --git a/.github/workflows/check_bom.yml b/.github/workflows/check_bom.yml new file mode 100644 index 000000000..a54217d37 --- /dev/null +++ b/.github/workflows/check_bom.yml @@ -0,0 +1,43 @@ +name: BOM Check + +on: + push: + pull_request: + +jobs: + bom-check: + if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + persist-credentials: false + fetch-depth: 0 + + - name: UTF-8 BOM + run: | + grep -oarlE -m 1 --include="*.c" --include="*.h" --include="*.rst" --include="*.txt" --include="*.mk" --include="*.py" --include="*.cmake" --include="Makefile" $'\xEF\xBB\xBF' . | while read -r line; do + a=$(head -c 3 "$line") + if [ "${a}" = $'\xEF\xBB\xBF' ]; then + echo "${line}" && exit 1 + fi + done + + - name: UTF-16LE BOM + run: | + grep -oarlE -m 1 --include="*.c" --include="*.h" --include="*.rst" --include="*.txt" --include="*.mk" --include="*.py" --include="*.cmake" --include="Makefile" $'\xFF\xFE' . | while read -r line; do + a=$(head -c 3 "$line") + if [ "${a}" = $'\xFF\xFE' ]; then + echo "${line}" && exit 1 + fi + done + + - name: UTF-16BE BOM + run: | + grep -oarlE -m 1 --include="*.c" --include="*.h" --include="*.rst" --include="*.txt" --include="*.mk" --include="*.py" --include="*.cmake" --include="Makefile" $'\xFE\xFF' . | while read -r line; do + a=$(head -c 3 "$line") + if [ "${a}" = $'\xFE\xFF' ]; then + echo "${line}" && exit 1 + fi + done diff --git a/src/libs/thorvg/tvgSwRasterAvx.h b/src/libs/thorvg/tvgSwRasterAvx.h index 7c1b46c42..5c1128c07 100644 --- a/src/libs/thorvg/tvgSwRasterAvx.h +++ b/src/libs/thorvg/tvgSwRasterAvx.h @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2021 - 2024 the ThorVG project. All rights reserved. * Permission is hereby granted, free of charge, to any person obtaining a copy