I have a legacy code, for which the complexity of the code is higher then 20. My pipelines are failing do to this fact. This is the exact error message from the pipelines:
Function's cyclomatic complexity (36) exceeds allowed maximum of 20
I don't have the time to refactor the code so, I am looking for a temporary solution like suppressing/ignoring my file:
I tried to use these:
* @SuppressWarnings(PHPMD)
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.LongVariable)
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
or
// @codingStandardsIgnoreStart
my code here
// @codingStandardsIgnoreEnd
I also followed this article , but my pipelines are still failing. Have you ever face such an issue before ? Do you have any idea how to fix this, without changing my pipelines settings/configurations ?
Thank you