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

Test different linter actions #680

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
21673ea
Create test-linter.yml
mvdkleijn Jan 29, 2024
c268031
Update linter.yml
mvdkleijn Jan 29, 2024
1ad15e1
Update test-linter.yml
mvdkleijn Jan 29, 2024
1899171
Update test-linter.yml
mvdkleijn Jan 29, 2024
a9a9d58
Update test-linter.yml
mvdkleijn Jan 29, 2024
c1e4724
Create phpstan.neon
mvdkleijn Jan 29, 2024
a080da5
Update test-linter.yml
mvdkleijn Jan 29, 2024
f33f34d
Create phpstan.neon
mvdkleijn Jan 29, 2024
bc290db
Update test-linter.yml
mvdkleijn Jan 29, 2024
bd6b5d4
Update phpstan.neon
mvdkleijn Jan 29, 2024
9fe7bc0
Update phpstan.neon
mvdkleijn Jan 29, 2024
62ddd84
Update phpstan.neon
mvdkleijn Jan 29, 2024
2e09dae
Update test-linter.yml
mvdkleijn Jan 29, 2024
e378edc
Update test-linter.yml
mvdkleijn Jan 29, 2024
f00a9d2
Update phpstan.neon
mvdkleijn Jan 29, 2024
149197a
Update test-linter.yml
mvdkleijn Jan 29, 2024
fc98365
Update phpstan.neon
mvdkleijn Jan 29, 2024
557508f
Update phpstan.neon
mvdkleijn Jan 29, 2024
cf35697
Update phpstan.neon
mvdkleijn Jan 29, 2024
53091ba
Update test-linter.yml
mvdkleijn Jan 29, 2024
549fb73
Update test-linter.yml
mvdkleijn Jan 29, 2024
26c93bc
Update phpstan.neon
mvdkleijn Jan 29, 2024
6a688b8
Update test-linter.yml
mvdkleijn Jan 29, 2024
e076bcc
Update phpstan.neon
mvdkleijn Jan 29, 2024
021124b
Update phpstan.neon
mvdkleijn Jan 29, 2024
a93dcee
Update test-linter.yml
mvdkleijn Jan 29, 2024
8d2caa4
Update phpstan.neon
mvdkleijn Jan 29, 2024
d0fbc92
Update test-linter.yml
mvdkleijn Jan 29, 2024
e586ee0
Update phpstan.neon
mvdkleijn Jan 29, 2024
c67306e
Update test-linter.yml
mvdkleijn Jan 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ name: Lint Code Base
#############################
# Start the job on all push #
#############################
on: # yamllint disable-line rule:truthy
push:
branches:
- 'master'
- 'releases/**'
pull_request:
types: [opened, edited, synchronize, reopened, review_requested]
#on: # yamllint disable-line rule:truthy
# push:
# branches:
# - 'master'
# - 'releases/**'
# pull_request:
# types: [opened, edited, synchronize, reopened, review_requested]

###############
# Set the Job #
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
parameters:
ignoreErrors:
- '#Class [a-zA-Z0-9\\_]+ extends unknown class App\SupportedApps#'
- '#Class [a-zA-Z0-9\\_]+ implements unknown interface App\EnhancedApps#'
75 changes: 75 additions & 0 deletions .github/workflows/test-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
name: lint

on:
push:
branches:
- 'master'
- 'releases/**'
pull_request:
types: [opened, edited, synchronize, reopened, review_requested]

jobs:
php-lint:
name: PHP lint 8.2
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: PHP syntax checker 8.2
uses: prestashop/github-action-php-lint/8.2@master

# phpmd:
# name: PHPMD
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
#
# - name: PHP Mess Detector
# uses: php-actions/phpmd@v1
# with:
# php_version: 8.2
# path: ./
# output: text
# ruleset: test/phpmd/ruleset.xml

phpcs:
name: PHPCS
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: PHP Code Sniffer
uses: php-actions/phpcs@v1
with:
php_version: 8.2
path: ./
standard: PSR12
ignore: livestats.blade.php,config.blade.php
exclude: Squiz.Functions.MultiLineFunctionDeclaration

# Figure out later what the correct paths for Heimdall src should be.
# Needed by PHPStan for symbol discovery.
#
# phpstan:
# name: PHPStan
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# path: src
#
# - name: Checkout Heimdall repo for dependencies
# uses: actions/checkout@v4
# with:
# repository: linuxserver/Heimdall
# path: ./heimdall-src
#
# - uses: php-actions/phpstan@v3
# with:
# path: src/
# configuration: src/phpstan.neon
5 changes: 5 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
level: 6
scanFiles:
- ../heimdall-src/app/SupportedApps.php
- ../heimdall-src/app/EnhancedApps.php
Loading