From f55f017c7f61bc2217b8785d7f2ac392330db03f Mon Sep 17 00:00:00 2001 From: Robert Brodie Date: Wed, 19 Jun 2024 15:46:24 -0400 Subject: [PATCH 1/4] SP-983 Add phpcs --- .github/analyze.yml | 18 ++++++++++++++++++ phpcs.xml | 15 +++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/analyze.yml create mode 100644 phpcs.xml diff --git a/.github/analyze.yml b/.github/analyze.yml new file mode 100644 index 0000000..ee7f6db --- /dev/null +++ b/.github/analyze.yml @@ -0,0 +1,18 @@ +name: Analyze + +on: [push, pull_request] + +jobs: + phpcs: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: php-actions/composer@v6 + with: + php_version: 8.1 + php_extensions: bcmath gmp xdebug + - name: PHP_CodeSniffer + run: | + curl -OL https://phars.phpcodesniffer.com/phpcs.phar + php phpcs.phar src \ No newline at end of file diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..385fb12 --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,15 @@ + + + + + This ruleset enforces the PSR1 and PSR2 coding standards. See + https://developers.whmcs.com/modules/style-guide/ for more information. + + + + + + modules/ + */vendor/* + + From cce1fdd5155f0a684523b9855f1f904043e496b2 Mon Sep 17 00:00:00 2001 From: Robert Brodie Date: Wed, 19 Jun 2024 15:47:24 -0400 Subject: [PATCH 2/4] SP-983 Add workflows dir --- .github/{ => workflows}/analyze.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/analyze.yml (100%) diff --git a/.github/analyze.yml b/.github/workflows/analyze.yml similarity index 100% rename from .github/analyze.yml rename to .github/workflows/analyze.yml From bc6dceefe952fb999887eb8c55ff104a4db40369 Mon Sep 17 00:00:00 2001 From: Robert Brodie Date: Wed, 19 Jun 2024 15:50:21 -0400 Subject: [PATCH 3/4] SP-983 Remove Composer --- .github/workflows/analyze.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index ee7f6db..d01170e 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -4,14 +4,10 @@ on: [push, pull_request] jobs: phpcs: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - uses: php-actions/composer@v6 - with: - php_version: 8.1 - php_extensions: bcmath gmp xdebug - name: PHP_CodeSniffer run: | curl -OL https://phars.phpcodesniffer.com/phpcs.phar From 3c7cff0b14af00caeefaf29215fadf6f1b014cca Mon Sep 17 00:00:00 2001 From: Robert Brodie Date: Wed, 19 Jun 2024 15:51:16 -0400 Subject: [PATCH 4/4] SP-983 Update the dir we use --- .github/workflows/analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index d01170e..856c129 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -11,4 +11,4 @@ jobs: - name: PHP_CodeSniffer run: | curl -OL https://phars.phpcodesniffer.com/phpcs.phar - php phpcs.phar src \ No newline at end of file + php phpcs.phar modules \ No newline at end of file