0

In Any Custom[Module/Extension] development What is use of

  • @codingStandardsIgnoreFile

  • @codeCoverageIgnore

  • @codingStandardsIgnoreStart

  • @codingStandardsIgnoreEnd

It is Valid in Magento Marketplace Extension Development

And It is valid Then Where We can Use For ignore Coding Standard Errors/Warnings

codeCoverageIgnore

This is used in InstallData, Why it is used here ?

1

@codingStandardsIgnoreFile = Ignore the whole file when testing the coding standards.

@codeCoverageIgnore = Ignore the file when testing the code coverage.

@codingStandardsIgnoreStart = Ignore the code below this when testing coding standards.

@codingStandardsIgnoreEnd = Used after @codingStandardsIgnoreStart to begin checking the code again.

As for why it is used there only the developer(s) who build it can say, it's often used to bypass coding standards checks as poor code has been written. I often disagree with even ignoring these tests, what is the point of a test if you are just going to ignore certain files that fail the test.

  • why @codeCoverageIgnore use in InstallData.php ? – Bhavesh Prajapati May 14 at 10:17
  • You'd need to ask the people who wrote it, I have no idea sorry. – Ben Crook May 14 at 10:55
  • when i try to check Magento-coding-standard without any comments it will provide me errors and with comment it will work fine 😀 – Bhavesh Prajapati May 16 at 4:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.