Closed arhimede closed 2 months ago
tested locally, ran these two
complains about 'trans' extension, e.g.
no impact for phpcs or psalm
the updated files can be reviewed here https://github.com/dotkernel/frontend/compare/issue-432?expand=1
the translation feature is set to be removed or replaced in https://github.com/dotkernel/frontend/issues/445, so that's a blocker for this issue
investigating a way to handle extensions, to pass the tests https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#token-parsers--more
vendor/bin/twig-cs-fixer lint
vendor/bin/twig-cs-fixer lint --fix
see the result here https://github.com/dotkernel/frontend/compare/issue-432?expand=1.twig-cs-fixer.php
be stored in the root of the project?.twig-cs-fixer.cache
should be gitignored?
- must
.twig-cs-fixer.php
be stored in the root of the project?
the config file location is relevant for where you run the check from
the alternative (if we want to move it) is to run the command with the config path
vendor/bin/twig-cs-fixer lint --config=dir/.twig-cs-fixer.php /path/to/code
where would be a better place for it?
* `.twig-cs-fixer.cache` should be gitignored?
i'll add this to the list
the config file location is relevant for where you run the check from the alternative (if we want to move it) is to run the command with the config path
vendor/bin/twig-cs-fixer lint --config=dir/.twig-cs-fixer.php /path/to/code
where would be a better place for it?
So .twig-cs-fixer.php
is a config file. Then it should be stored in the config
directory.
We could create a composer script (see scripts) that runs the command with --config=config/twig-cs-fixer.php
appended.
https://github.com/VincentLanglet/Twig-CS-Fixer
we should investigate if we want to enforece a twig code style in phpstorm and in CI actions