Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Code Sniffer ruleset between Magento and MFTF #265

Closed
lbajsarowicz opened this issue Nov 4, 2018 · 6 comments
Closed

Inconsistent Code Sniffer ruleset between Magento and MFTF #265

lbajsarowicz opened this issue Nov 4, 2018 · 6 comments

Comments

@lbajsarowicz
Copy link
Contributor

lbajsarowicz commented Nov 4, 2018

For Magento contribution we are expected to follow several code style rules defined by PHP Code Sniffer ruleset: https://github.com/magento/magento2/blob/c934ccc3bfa1a79b78052c61a5478eaf77de7029/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml

For Magento Functional Testing Framework the ruleset (https://github.com/magento/magento2-functional-testing-framework/blob/95aa636421933fe23338acb98089408ce7637a63/dev/tests/static/Magento/ruleset.xml) for code is different, inconsistent to the Magento one.

Expected result

  1. Ruleset should be consistent across all Magento projects.

zrzut ekranu 2018-11-5 o 09 09 16

zrzut ekranu 2018-11-5 o 09 09 27

The most irritating rule for MFTF is...

zrzut ekranu 2018-11-3 o 15 46 36

@KevinBKozan
Copy link
Contributor

@lbajsarowicz Thanks for reporting this! At some point in the past we were forced to update our codesniffer rulesets, and tried to match whatever was in the current develop branch (which may or may not have included the above irritating rule).

I am going to create a ticket internally to fix this, as I agree that our standards should allign with the main application..

@ihor-sviziev
Copy link
Contributor

https://github.com/magento/marketplace-eqp - here is one more set of rules. Different rule set.

@ravmenon
Copy link

@ihor-sviziev we do plan to consolidate the EQP rules with core M2 and possibly others - there is a plan in the works. Will share more more details once we finalize it.

@tomreece
Copy link
Contributor

tomreece commented Oct 7, 2019

Internal ticket
https://jira.corp.magento.com/browse/MQE-1341

@lbajsarowicz
Copy link
Contributor Author

@tomreece / @okolesnyk - Support for PHP 7.0 and 7.1 should be dropped.

@lbajsarowicz
Copy link
Contributor Author

lbajsarowicz commented Jan 11, 2020

Magento codebase is too different from MFTF, so the full set of rules does not make sense.

We should follow most of the PHP rules from magento/magento2 repository, but drop the ones specific for Magento.

phpcs-failures.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants