Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowlist/Exclude Certain Files #3

Open
hf-kklein opened this issue Aug 29, 2022 · 1 comment
Open

Allowlist/Exclude Certain Files #3

hf-kklein opened this issue Aug 29, 2022 · 1 comment

Comments

@hf-kklein
Copy link

Is there a possibility to allowlist/exclude certain files from the check? Like an entire directory, or specific files or specific file endings?

@hf-kklein
Copy link
Author

nearly 2 years after my question I stumbled accross this again.
here's my dirty fix

name: Prevent ByteOrderMarks

on:
  push:
    branches:
      - main
  pull_request: { }

jobs:
  bom-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: arma-actions/bom-check@v1
        name: Check for BOM
        with:
          path: "$(find \"$1\" -type f ! -path './path/to/a/file/that/is/utf8bomencoded')"

It's a bit hacky and the value of path is used as $1 here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant