Conversation
|
Hi @szepeviktor , especially looking for your feedback on this! |
|
@Levdbas What is the current error count? |
|
@szepeviktor , Lukas and I discussed the PHP cs rulesets. Could you advice in how to implement https://github.com/szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset while keep the possibility that users can add their own rules? I am pretty new to the whole ruleset creation thing so any help is appreciated! |
A ruleset is simply one XML file with rules listed in it. |
|
One can disable an existing rule or add a new one in the theme. |
BTW This frankenstein is dangerous. It wears out your keyboard and your brain. |
|
Updated the PHPCS ruleset base |
|
@Levdbas Thanks for the update. I think it’s good to use a standard like the 10up standard. It means less work for us. And the phpcs.xml.dist looks a bit more accessible now. In my opinion, it’s easy to spot that we load in a standard through Composer which is then applied in phpcs.xml.dist. This also makes it easy to swap it out with another standard of your choice. |
Related:
Issue
Since the creation of the starter theme a lot has happened in PHP, WordPress and Timber. I want to make the starter-theme a more modern starting point for custom theme development.
As mentioned by @szepeviktor in #147 (comment), it's a good idea to introduce a coding style.
I would like the help of you @szepeviktor and @gchtr to help me enhance the introduction of these two tools. This is my first time introducing them in a project, so any help/tips are welcome.
I want to start linting file and introduce taskrunners when we have the overhaul with all the other PRs in place. So linting would be a final step as I see it now.
Solution
Introduce phpcs and phpstan so we can start linting files.
Impact
A coding style to adhere to is always great.
Usage Changes
No
Considerations
I just plucked some configurations from the internet and that can be improved of course, please help out 🗡️
Testing
no