Open ihor-sviziev opened 4 years ago
Hello @ihor-sviziev , What should be the severity and type of this rule?
After further investigation, I found that this rule is a part of PSR-12. Please check PSR12.Files.ImportStatement
. Let me know your thoughts
Thanks
@lenaorobei could you defined which severity should be set for this rule? As for me - should be 6, similar to https://github.com/magento/magento-coding-standard/blob/199057a8ca960e0bb191ec8fd7a409fbd91c8a51/Magento2/ruleset.xml#L457-L460
@konarshankar07 I think it's good idea to re-use rules from PSR12
Agree with @ihor-sviziev, severity 6 is that we use for code style.
And yes, it would be nice to reuse PSR12.
Adding @coderimus since he is working on PSR12 update.
@konarshankar07 do you have any updates? Do you have some working version?
Hello @ihor-sviziev ... I'm waiting for the PSR12 update cause there is already a rule for this in PSR-12. I'm not sure if we have updated the PSR12 or not Thanks
Not sure if this is helpful but PSR-12 support just made it in v2.18.0 of friendsofphp/php-cs-fixer (also not sure if this comment makes sense in this repo since the magento2 repo makes use of it but the coding-standard not, which is odd ...)
use section does not actually need \ at the beginning of the classpath (leading backslash). Let’s enforce it by static tests to prevent appearing such cases in future
Originally posted by @ihor-sviziev in https://github.com/magento/magento2/pull/26129#issuecomment-567404199