#106515Allow ignore for a specific issue / false positives for ExtensionScanner
Description
I’d like to see a feature that allows me to add the issue number to the ignore-tag of the ExtensionScanner. To explicitly mark an Line as a false positive for one or multiple issues.
Right now a line is completely ignored when adding `// @extensionScannerIgnoreLine` which will prevent the extensionscanner to find real deprecations when added in a feature update.
Let’s make an example, currently there is https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/10.0/Breaking-87193-DeprecatedFunctionalityRemoved.html wich states `->addProperty` from Extbase as deprecated / removed.
Currently this is a valid method in metatagManager, wich makes this a false positive, wich i will tag with IgnoreLine to have my extension pass the scan. So far so good.
But what will happen if in a feature Release the MetatagManager will be changed and the Method is going to become deprecated. Then we will habe a correct detection of that line but it will never be listed / found because i marked the line to be ignored.
There was already an request some years ago which hadn’t that much response. But maybe the need for something like this got stronger over the Years and I’m not alone with my wish.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 4
-
Ingo Hollmann changed Related to #90983 04/07/25, 10:17
-
Christian Kuhn commented 04/07/25, 14:52
-
Ingo Hollmann changed subject
Allow ignore for a specific issue / false psoitive for ExtensionScannerAllow ignore for a specific issue / false positives for ExtensionScanner 04/07/25, 14:54 -
Garvin Hicking commented and changed status
NewClosed 04/08/25, 07:15I have to agree with Christian here in this issue and the closed one https://forge.typo3.org/issues/90983
I’m afraid due to no further feedback in the original issue, or any further duplicate requests, the need for this may be very low. Considering that this is a very time consuming task with little broad benefit, and trying to keep the open issues here manageable I am going to close the issue and hope you can understand.
If we were to start parsing arguments hidden in comments, we would probably better use PHP attributes. This in turn needs to be “enabled” via opt-in instantiation, which is a lot of overhead and work. Also, false positives will always happen due to the nature of the scanner rules.
I do understand your concern and agree it would be a cool thing to have, but for now I’d recommend to actually try to not ignore matches, but instead add manual comments hinting at why a false positive match occurs, then you’d be on the “safe side” for the future. Inspecting the extension scanner rule results is usually only done on major upgrades and revisited on the next – if your goal is to have an “all green” extension scanner result, this is kind of a lost battle again windmills I’m afraid.
If you want to try to implement this, please feel free to propose a patch!
The annotations should be used with care and reviewed once in a while.
I think it will be hard to parse comments for specific things, and they may become victims of changed rulesets as well. If there are matches that are ‘too generic’ and create too many false positives, the rule should rather be removed.