diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2288092..883ba74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,4 +8,3 @@ jobs: - uses: ArkScript-lang/action-format@master with: folder: example - exclude: example/excluded diff --git a/README.md b/README.md index 1c78eba..4856d75 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,10 @@ inputs: folder: description: 'Folder with .ark files to check' required: true - exclude: - description: 'Folders to exclude, comma separated' ``` > [!WARNING] > The folders **MUST NOT** be terminated by a `/` -- **folder**: path to ArkScript files ; will be scanned recursively for `*.ark` files -- **exclude**: list of path to exclude, eg `foo,bar,egg/test` +- **folder**: path to ArkScript files ; will be scanned for `*.ark` files diff --git a/action.yaml b/action.yaml index a5d53a2..a8f6af8 100644 --- a/action.yaml +++ b/action.yaml @@ -5,8 +5,6 @@ inputs: folder: description: 'Folder with .ark files to check' required: true - exclude: - description: 'Folders to exclude, comma separated' runs: using: 'composite' @@ -24,16 +22,6 @@ runs: - name: Check shell: bash run: | - exclusions='' - if ! [ -z "${{ inputs.exclude }}" ]; then - IFS=',' read -ra EXC <<< "${{ inputs.exclude }}" - for i in "${EXC[@]}"; do - # process "$i" - exclusions="$exclusions -not -path '$i/*'" - done - echo "Exclusions: '$exclusions'" - fi - failures=0 while read -rd $'\0' file; do if ! ./arkscript --format "$file" --check; then @@ -42,7 +30,7 @@ runs: else echo "✅ $(basename $file)" fi - done < <(find "${{ inputs.folder }}" -type f -name "*.ark" $exclusions -print0) + done < <(find "${{ inputs.folder }}" -type f -name "*.ark" -maxdepth 1 -print0) echo "$failures file(s) need to be formatted" [ $failures -gt 0 ] && exit 1 || exit 0