TwoFactorAuth icon indicating copy to clipboard operation
TwoFactorAuth copied to clipboard

Going all in on linting

Open willpower232 opened this issue 2 years ago • 4 comments

I've been using easy-coding-standard to wrap phpcs and php-cs-fixer and radically shorten the configuration which explains all my past confusion around spaces in this project.

I tried to maintain the behaviour of composer lint and composer lint-ci in spite of ecs's default behaviour being to not fix.

I presume that ecs saw the inheritdoc's weren't necessary as everything was typed perhaps? Not sure on that one. phpstan doesn't seem to mind so ¯\_(ツ)_/¯

I added in another linter I use which I think just makes sure it is valid PHP rather than applying a style.

I also spotted that the phpstan config could be simplified.

cc @NicolasCARPi that I can't directly invite for a review via github

willpower232 avatar Jun 04 '23 11:06 willpower232

ecs wraps both php cs and php cs fixer so technically all I have done is reduce the length of the rules file into one with more groups and no specific rules and made it so the default behaviour is to check and not to fix

willpower232 avatar Jun 05 '23 08:06 willpower232

The complexity of the current configuration has required me to remove a specific rule as it is now handled by default and caused a lint failure

image

https://github.com/RobThree/TwoFactorAuth/commit/137df4dd3cd998e7096705cd0b3aed17b4c25d53

The comparative simplicity of this PR means we aren't beholden to specific minor decisions made upstream which we don't really care about.

willpower232 avatar Jul 29 '23 14:07 willpower232

@willpower232 Do you wish to work on resolving conflicts on this branch, or should this be closed now?

NicolasCARPi avatar Apr 17 '24 18:04 NicolasCARPi

I'll pick this up at some point, probably in a couple of weeks :pray:

willpower232 avatar Apr 18 '24 08:04 willpower232