\\ Aktuelles > allgemeine Entwicklung > Tools > PhpStorm @noinspection

PhpStorm @noinspection

Nicht immer sind Inspection Warnungen lösbar weil sie im Prinzip korrekt sind. Trotzdem wäre ein fehler- und warnungsfreie Anzeige wünschenswert. Mit diesen Kommentaren ist das erreichbar.

Ausgangssituation

$configuration = require_once($projectPath . $localConfigurationFilePath);

 

Vorheriger Code führt normalerweise zur Ausgabe der Warnung:

 

Dynamic include expression 'require_once($projectPath . $localConfigurationFilePath)' is not analysed.

Mögliche Anpassung

durch das hinzufügen des folgenden Kommentars kann diese Warnung übergangen werden.

 

/** @noinspection PhpIncludeInspection */

 

Diese Anpassung sollte aber nur dann vorgenommen werden wenn man sicher ist, dass dadurch nicht Fehler verdeckt werden, auf die man eigentlich aufmerksam gemacht werden soll.

Weitere Warnungen die unterdrück werden können

javascript

ES6ValidationInspection
JSAccessibilityCheckInspection
JSBitwiseOperatorUsageInspection
JSCheckFunctionSignaturesInspection
JSClosureCompilerSyntaxInspection
JSCommentMatchesSignatureInspection
JSComparisonWithNaNInspection
JSConsecutiveCommasInArrayLiteralInspection
JSConstructorReturnsPrimitiveInspection
JSDeclarationsAtScopeStartInspection
JSDeprecatedSymbolsInspection
JSDuplicatedDeclarationInspection
JSJQueryEfficiencyInspection
JSLastCommaInArrayLiteralInspection
JSLastCommaInObjectLiteralInspection
JSMethodCanBeStaticInspection
JSMismatchedCollectionQueryUpdateInspection
JSPotentiallyInvalidConstructorUsageInspection
JSPotentiallyInvalidTargetOfIndexedPropertyAccess
JSPotentiallyInvalidUsageOfThisInspection
JSPrimitiveTypeWrapperUsageInspection
JSReferencingMutableVariableFromClosureInspection
JSSuspiciousNameCombinationInspection
JSUndeclaredVariableInspection
JSUndefinedPropertyAssignmentInspection
JSUnfilteredForInLoopInspection
JSUnnecessarySemicolonInspection
JSUnresolvedFunctionInspection
JSUnresolvedLibraryURLInspection
JSUnresolvedVariableInspection
JSUnusedAssignmentInspection
JSUnusedGlobalSymbolsInspection
JSUnusedLocalSymbolsInspection
JSValidateJSDocInspection
JSValidateTypesInspection

watcher

TaskInspection
TaskProblemsInspection

css

CssFloatPxLengthInspection
CssNoGenericFontNameInspection
CssUnitlessNumberInspection
CssConvertColorToHexInspection
CssConvertColorToRgbInspection
CssInvalidElementInspection
CssNegativeValueInspection
CssOptimizeSimilarPropertiesInspection
CssOverwrittenPropertiesInspection
CssUnknownPropertyInspection
CssUnusedSymbolInspection
CssInvalidAtRuleInspection
CssInvalidCharsetRuleInspection
CssInvalidFunctionInspection
CssInvalidHtmlTagReferenceInspection
CssInvalidImportInspection
CssInvalidMediaFeatureInspection
CssInvalidPropertyValueInspection
CssInvalidPseudoSelectorInspection
CssUnknownTargetInspection
CssMissingSemicolonInspection
CssRedundantUnitInspection

sql

SqlAddNotNullColumnInspection
SqlAmbiguousColumnInspection
SqlAutoIncrementDuplicateInspection
SqlCheckUsingColumnsInspection
SqlConstantConditionInspection
SqlDerivedTableAliasInspection
SqlDialectInspection
SqlDropIndexedColumnInspection
SqlIdentifierInspection
SqlInsertValuesInspection
SqlNoDataSourceInspection
SqlNullComparisonInspection
SqlResolveInspection
SqlShouldBeInGroupByInspection
SqlTypeInspection

oracle

SqlDeprecateTypeInspection

postgresql

SqlPostgresqlSelectFromProcedureInspection

php

PhpUndefinedGotoLabelInspection Undefined goto label
PhpUndefinedVariableInspection Undefined variable
PhpUndefinedMethodInspection Undefined method
PhpUndefinedNamespaceInspection Undefined namespace
PhpUndefinedClassInspection Undefined class
PhpUndefinedFunctionInspection Undefined function
PhpUndefinedCallbackInspection Undefined callback
PhpDynamicAsStaticMethodCallInspection Dynamic method called as static
PhpStaticAsDynamicMethodCallInspection Static method called as dynamic
PhpAbstractStaticMethodInspection Static function should not be abstract
PhpSignatureMismatchDuringInheritanceInspection Declaration of overridden method should be compatible with parent class
PhpHierarchyChecksInspection  
PhpUndefinedClassConstantInspection Undefined class constant
PhpMissingParentConstructorInspection Missing parent call for constructor
PhpMissingParentCallCommonInspection Missing parent call for method
PhpMissingParentCallMagicInspection Missing parent call for magic methods
PhpUndefinedFieldInspection Undefined field
PhpUndefinedConstantInspection Undefined constant
PhpIncludeInspection Unresolved include
PhpParamsInspection Parameter type
PhpPassByRefInspection Pass parameter by reference
PhpGotoIntoLoopInspection Goto into loop statement
PhpUnusedPrivateMethodInspection Unused private method
PhpUnusedPrivateFieldInspection Unused private field
PhpUnusedLocalVariableInspection Unused local variable
PhpUnusedAliasInspection Unused import
PhpLanguageLevelInspection Language Level
PhpUnreachableStatementInspection  
PhpDeprecationInspection Deprecated
PhpInternalEntityUsedInspection Usage of internal entity
PhpToStringReturnInspection Method __toString return type
PhpToStringImplementationInspection Method __toString implementation
PhpNonCompoundUseInspection Unnecessary statement use
PhpConstantReassignmentInspection Constant reassignment
PhpWrongStringConcatenationInspection Wrong string concatenation
PhpWrongCatchClausesOrderInspection Wrong catch clauses order
PhpAssignmentInConditionInspection Assignment in condition
PhpDivisionByZeroInspection Division by zero
PhpWrongForeachArgumentTypeInspection Invalid argument supplied for foreach()
PhpUnusedParameterInspection Unused parameter
PhpMissingDocCommentInspection Missing PHPDoc comment
PhpSillyAssignmentInspection Silly assignment
PhpIllegalArrayKeyTypeInspection Illegal array key type
PhpDocSignatureInspection PHPDoc comment matches function/method signature
PhpDocMissingThrowsInspection Missing @throws tag(s)
PhpDocMissingReturnTagInspection Missing @return tag
PhpInconsistentReturnPointsInspection Inconsistent return points
PhpMethodParametersCountMismatchInspection Parameters number mismatch declaration
PhpTooManyParametersInspection Too many parameters in function declaration
PhpRedundantClosingTagInspection Redundant closing tag
PhpVoidFunctionResultUsedInspection Void function result used
PhpExpressionResultUnusedInspection Expression result unused
PhpMethodOrClassCallIsNotCaseSensitiveInspection Case mismatch in method call or class usage
PhpClassNamingConventionInspection Class name is not following coding convention
PhpFunctionNamingConventionInspection Function name is not following coding convention
PhpMethodNamingConventionInspection Method name is not following coding convention
PhpPropertyNamingConventionInspection Property name is not following coding convention
PhpVariableNamingConventionInspection Variable name is not following coding convention
PhpConstantNamingConventionInspection Constant name is not following coding convention
PhpUnusedClassInspection Unused class
PhpUnusedFunctionInspection Unused function
PhpMissingBreakStatementInspection Missing 'break' statement
PhpForeachNestedOuterKeyValueVariablesConflictInspection Nested vs outer 'foreach' variables conflict
PhpForeachArrayIsUsedAsValueInspection Foreach array is used as value
PhpUsageOfSilenceOperatorInspection Usage of a silence operator
PhpCSValidationInspection PHP Code Sniffer validation
MessDetectorValidationInspection PHP Mess Detector validation
PhpDuplicateArrayKeysInspection  
PhpUnnecessaryFullyQualifiedNameInspection Unnecessary fully qualified name
PhpDuplicateCaseInspection Duplicate case in switch statement
PhpMultipleClassesDeclarationsInOneFile Multiple classes declarations in one file
PhpIllegalPsrClassPathInspection Class path doesn't match project structure
PhpTraditionalSyntaxArrayLiteralInspection Traditional syntax array literal detected
Php7ReadinessInspection PHP 7 Compatibility
PhpVariableVariableInspection Usage of a variable variable
PhpStrictTypeCheckingInspection Strict type checking rules violation
PhpIncompatibleReturnTypeInspection Incompatible return type
PhpMissingStrictTypesDeclarationInspection Missing strict types declaration
PhpInvalidMagicMethodModifiersInspection Invalid magic method modifiers

php blade

BladeClosingSectionInspection
BladeControlDirectivesInspection

ini

DuplicateKeyInspection
DuplicateSectionInspection

coffeescript

CoffeeScriptInfiniteLoopInspection
CoffeeScriptSillyAssignmentInspection
CoffeeScriptSwitchStatementWithNoDefaultBranchInspection
CoffeeScriptUnusedLocalSymbolsInspection

xpath

CheckNodeTest
HardwiredNamespacePrefix
ImplicitTypeConversion
IndexZeroPredicate
RedundantTypeConversion
TemplateInvocationInspection
UnusedElementInspection
VariableShadowingInspection
XsltDeclarationInspection

cucumber

CucumberExamplesColonInspection
CucumberMissedExamplesInspection
CucumberStepInspection
CucumberTableInspection
GherkinBrokenTableInspection
GherkinMisplacedBackgroundInspection

less

LessResolvedByNameOnlyInspection
LessUnresolvedMixinInspection
LessUnresolvedVariableInspection

scss

SassScssResolvedByNameOnlyInspection
SassScssUnresolvedMixinInspection
SassScssUnresolvedPlaceholderSelectorInspection
SassScssUnresolvedVariableInspection