pickware / style-guide

How we work with code
0 stars 0 forks source link

Improve linting performance and coverage #4

Closed thomasnordquist closed 5 years ago

thomasnordquist commented 7 years ago

Currently eslint checks all *.js files of the current project upon commit. This makes committing rather slow and painful.

Currently the pre-commit hook checks every *.php file that has changed and every *.js file in the project.

I'd propose that we only change *.php & *.js files that have changes in the pre-commit hook. In addition a complete check of the project with phpcs and eslint in the pre-push hook should be implemented.

This way commits can be done a lot faster and code style can be guaranteed with the not-as-frequently-executed push.

Any thoughts ? @fixpunkt, @svenmuennich

svenmuennich commented 7 years ago

As already discussed in person, I think this is a really good tradeoff between not adding negative impact on developer workflows and keeping the code style intact.

👍

svenmuennich commented 7 years ago

@fixpunkt and I discussed this and agree that we will change this as proposed.

svenmuennich commented 7 years ago

I've implemented all required changes. From now on, all shopware plugins must have a phpcs.xml file in their root dir, which both defines the used standard and allows to exclude directories like ViisonCommon from the style check.

I'll keep this issue open until all plugins that use the style guide are updated.

svenmuennich commented 7 years ago

I've already updated the style guide in ViisonPickwareERP and ViisonPickwareMobile. Maybe someone finds the time to update the other plugins.

thomasnordquist commented 7 years ago

Seems to be done. Close ?

svenmuennich commented 7 years ago

We're still missing the phpcs.xml in most of our plugins. Feel free to identify those plugins and add the file ;)

svenmuennich commented 5 years ago

All plugins that should be linted contain phpcs.xml.