Skip to content

Commit

Permalink
Updated Lint as per MB
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed Nov 24, 2024
1 parent 43a0db7 commit 7142bae
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/Lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,16 @@ jobs:
php-version: ${{ matrix.php }}
tools: composer:v2, cs2pr

- name: Lint
- name: Lint PHP Files
run: |
error=0
for file in $(find upload -type f -name "*.php" ! -path 'upload/system/storage/vendor/*'); do
php -l -n $file | grep -v "No syntax errors detected" && error=1
done
if [ $error -eq 1 ]; then
if find upload -type f -name "*.php" ! -path 'upload/system/storage/vendor/*' -exec php -l -n {} + | grep -q "Errors parsing"; then
echo "Syntax errors were found."
exit 1
else
echo "No syntax errors were detected."
fi
- name: Cache dependencies
- name: Install dependencies
uses: actions/cache@v3
with:
path: |
Expand All @@ -50,12 +46,12 @@ jobs:
key: ${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
restore-keys: OC3.2-PHP${{ matrix.php }}-

- name: PHPStan
- name: Run PHPStan
run: |
composer require --dev phpstan/phpstan 2.02
./upload/system/storage/vendor/bin/phpstan analyze --no-progress
- name: Code style
- name: Check Code style
run: |
composer require --dev friendsofphp/php-cs-fixer v3.64.0
./upload/system/storage/vendor/bin/php-cs-fixer fix --dry-run --diff --ansi || true
Expand Down

0 comments on commit 7142bae

Please sign in to comment.