Skip to content

Commit 5cc5b1e

Browse files
authored
Merge pull request #9 from yournextagency/remove-twigcs
Completely remove friendsoftwig/twigcs
2 parents cd55885 + 839e70e commit 5cc5b1e

7 files changed

Lines changed: 5 additions & 109 deletions

File tree

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ COPY entrypoint.sh \
1818
problem-matcher.json \
1919
/action/
2020

21-
COPY TwigRules \
22-
/root/.composer/TwigRules
23-
2421
COPY composer.json \
2522
/root/.composer
2623

TwigRules/YNARuleset.php

Lines changed: 0 additions & 45 deletions
This file was deleted.

action.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
name: 'PHP and Twig CS check'
2-
description: 'PHP and Twig Code sniffer check with custom ruleset'
1+
name: 'PHP CS check'
2+
description: 'PHP Code sniffer check with custom ruleset'
33
inputs:
44
phpcs_paths:
55
description: 'Paths to check'
66
required: false
77
default: './modules'
8-
twigcs_paths:
9-
description: 'Paths to check'
10-
required: false
11-
default: './templates'
128
enable_warnings:
139
description: 'Enable checking for warnings (-w)'
1410
required: false
@@ -26,4 +22,3 @@ runs:
2622
image: 'Dockerfile'
2723
args:
2824
- ${{ inputs.phpcs_paths }}
29-
- ${{ inputs.twigcs_paths }}

composer.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
{
22
"name": "yournextagency/github-actions-php",
33
"type": "library",
4-
"require": {
5-
"friendsoftwig/twigcs": "^3.2"
6-
},
74
"autoload": {
85
"psr-4": {
9-
"YNA\\": "YNA/",
10-
"TwigRules\\": "TwigRules/"
6+
"YNA\\": "YNA/"
117
}
128
}
139
}

entrypoint.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ else
1414
${INPUT_PHPCS_BIN_PATH} --standard=YNA --report=checkstyle --ignore=${INPUT_PHPCS_IGNORE_PATHS} ${INPUT_PHPCS_PATHS}
1515
fi
1616

17-
/root/.composer/vendor/friendsoftwig/twigcs/bin/twigcs --ruleset \\TwigRules\\YNARuleset ${INPUT_TWIGCS_PATHS}
18-
1917
status=$?
2018

2119
echo "::remove-matcher owner=phpcs::"

problem-matcher.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,6 @@
1818
"loop": true
1919
}
2020
]
21-
},
22-
{
23-
"owner": "twigcs",
24-
"severity": "error",
25-
"pattern": [
26-
{
27-
"regexp": "^(.*\\.twig)$",
28-
"file": 1
29-
},
30-
{
31-
"regexp": "l\\.(\\d+)\\sc.(\\d+)\\s:\\s(ERROR|WARNING)\\s(.*)",
32-
"line": 1,
33-
"column": 2,
34-
"severity": 3,
35-
"message": 4,
36-
"loop": true
37-
}
38-
]
3921
}
4022
]
4123
}

readme.md

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
PHP Code sniffer Github action
1+
PHP Code sniffer GitHub action
22
-
3-
This action runs phpcs with YNA ruleset with github action
3+
This action runs phpcs with YNA ruleset with GitHub action
44

55
Usage
66
-
@@ -27,14 +27,6 @@ You can pass a set of your own directories using `phpcs_paths` input
2727
with:
2828
phpcs_paths: './modules ./plugins ./any_other_dir'
2929

30-
By default twigcs checks the code in `templates` directory.
31-
You can pass a set of your own directories using `twigcs_paths` input
32-
33-
- name: TWIGCS check
34-
uses: yournextagency/github-actions-php@master
35-
with:
36-
twigcs_paths: './modules ./plugins ./any_other_dir'
37-
3830
How to use CodeSniffer (phpcs) locally and/or with PhpStorm
3931
-
4032
### Download the latest version of phpcs:
@@ -79,22 +71,3 @@ For more usage cases check [official documentation](https://github.com/squizlabs
7971
Select `YNA` in `Coding Standard` selectbox.
8072

8173
- `File -> Invalidate Caches / Restart`
82-
83-
How to use TwigCS locally
84-
-
85-
86-
- Add this repo to composer.json repositories:
87-
```json
88-
"repositories": [
89-
{
90-
"type": "vcs",
91-
"url": "https://github.com/yournextagency/github-actions-php.git"
92-
}
93-
]
94-
```
95-
- `composer require yournextagency/github-actions-php:dev-master --dev`
96-
- After you will be able to run TwigCS:
97-
98-
`
99-
./vendor/bin/twigcs --ruleset \\TwigRules\\YNARuleset ./templates
100-
`

0 commit comments

Comments
 (0)