Closed Levdbas closed 4 months ago
Hi @szepeviktor , especially looking for your feedback on this!
@Levdbas What is the current error count?
@Levdbas What is the current error count?
Currently 30 PHPstan issues but most of them will be fixed by #152 by the correct use
. I now also was able to scan the files in the root directory by changing the config a bit.
@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!
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.
Could you advice in how to implement
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:
152
153
154
155
156
157
158
159
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 https://github.com/timber/starter-theme/issues/147#issuecomment-1805365281, 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