File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,9 +18,6 @@ COPY entrypoint.sh \
1818 problem-matcher.json \
1919 /action/
2020
21- COPY TwigRules \
22- /root/.composer/TwigRules
23-
2421COPY composer.json \
2522 /root/.composer
2623
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 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'
33inputs :
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
2622 image : ' Dockerfile'
2723 args :
2824 - ${{ inputs.phpcs_paths }}
29- - ${{ inputs.twigcs_paths }}
Original file line number Diff line number Diff line change 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}
Original file line number Diff line number Diff line change 1414 ${INPUT_PHPCS_BIN_PATH} --standard=YNA --report=checkstyle --ignore=${INPUT_PHPCS_IGNORE_PATHS} ${INPUT_PHPCS_PATHS}
1515fi
1616
17- /root/.composer/vendor/friendsoftwig/twigcs/bin/twigcs --ruleset \\ TwigRules\\ YNARuleset ${INPUT_TWIGCS_PATHS}
18-
1917status=$?
2018
2119echo " ::remove-matcher owner=phpcs::"
Original file line number Diff line number Diff line change 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}
Original file line number Diff line number Diff line change 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
55Usage
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-
3830How 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- `
You can’t perform that action at this time.
0 commit comments