UnknownInspection
info on by defaultGroup: Code style · PhpStorm name: UnknownInspectionInspection
A @noinspection suppression naming an inspection that does not exist (typo, renamed or removed rule) silently suppresses nothing. Point it out so it can be corrected or deleted.
Example
php
<?php
function audit() {
/** @noinspection PhpLegacyCheckInspector */
/* @noinspection TypoNameInspection */
/** @noinspection PhpUnused, PhpGoneAway -- kept for BC */
/** @noinspection PhpUndefinedMethodInspection */
/** @noinspection UnnecessarySemicolonInspection */
/** @noinspection UnnecessarySemicolon */
/** @noinspection SqlNoDataSourceInspection2 */
/** @noinspection JSUnresolvedReference */
// @noinspection PhpWhatever
}Reported:
- line 3: Suppressed inspection not recognised: PhpLegacyCheckInspector.
- line 4: Suppressed inspection not recognised: TypoNameInspection.
- line 5: Suppressed inspection not recognised: PhpGoneAway.
Configure
In custos.json:
json
{
"rules": {
"UnknownInspection": {
"enabled": false
}
}
}Suppress
Before the statement or declaration (or the first statement of the file), either of:
php
// @custos-ignore UnknownInspection
/**
* @noinspection UnknownInspectionInspection
*/