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
Add Github Actions config for syntax checking #895
base: master
Are you sure you want to change the base?
Conversation
6abc4c6
to
79cda36
Compare
Lots of these tests fail at the moment :-) I temporarily added my fork to Travis https://travis-ci.org/samwilson/Piwigo and you can see an example of the results at https://travis-ci.org/samwilson/Piwigo/jobs/403372472 |
99.9% of 'Line indented incorrectly' |
I'm not sure if you meant it, but that comes across as sarcastic. I'm actually trying to help here! I'm not suggesting that the phpcs ruleset is complete or correct, and of course it needs to be fixed up. The idea here is that automatic checks be done. The details of those checks need to be figured out. :-) |
I'm not suggesting anything neither |
Okay, sorry, I took your comment wrongly! :-) Is easily done in these text worlds. Anyway, I've removed the indenting rules. There are still lots of errors, but they can all (I think) be fixed automatically. There are lots of files in |
bfa4955
to
f22c11b
Compare
I've remove all but the syntax checking from this PR, to keep it simpler. The build is now passing: The changes to xmlrpc_encoder.php are to wrap the xmlrpc_encode() function in a conditional, but I didn't re-indent the actual function just to keep the diff cleaner. |
Adding Continuous Integration with automated check is great. I'll review it next week. Thank you @samwilson |
15468e1
to
0209b35
Compare
f751080
to
31a5c82
Compare
I've brought this up to date, in case it's still of interest. See example results at https://travis-ci.org/samwilson/Piwigo/builds/571741891 |
I've brought this up to date and switched it to use Github Actions. Results are at https://github.com/samwilson/Piwigo/actions/runs/127365045 |
Hi @samwilson I'm reviewing this pull-request. I don't know yet how to deal with it. I think it would be interesting indeed to have an automatic check on syntax and maybe on coding style (which would already be complex to configure I guess). |
This adds continuous-integration configuration for checking PHP syntax. Refs: Piwigo#817
I've added PHP 8.0 and 8.1 to this patch now (and removed the comment about only testing against supported PHP versions, because it's good to keep testing against all working versions). You can see the current results at https://github.com/samwilson/Piwigo/actions/runs/2729396577 I think having at least a basic syntax-check would be a good thing (to avoid issues such as #894), and as you say it could eventually be extended to also include coding style (I started some work on a phpcs standard at https://github.com/samwilson/piwigo-coding-standards ). Let me know if there's more info that should be added to this patch. |
This adds continuous-integration configuration for checking PHP syntax.
Refs: #817