Skip to content

Instantly share code, notes, and snippets.

@discordier
Created December 4, 2014 06:23
Show Gist options
  • Save discordier/ed4b9cba14652e7212f5 to your computer and use it in GitHub Desktop.
Save discordier/ed4b9cba14652e7212f5 to your computer and use it in GitHub Desktop.
options for phpStorm @noinspection annotation
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
PhpAbstractStaticMethodInspection
PhpHierarchyChecksInspection
PhpUnreachableStatementInspection
PhpUnusedLocalVariableInspection
PhpWrongCatchClausesOrderInspection
PhpDeprecationInspection
PhpDocMissingReturnTagInspection
PhpDocMissingThrowsInspection
PhpDocSignatureInspection
PhpMissingDocCommentInspection
PhpDuplicateArrayKeysInspection
PhpDuplicateCaseInspection
PhpDynamicAsStaticMethodCallInspection
PhpExpressionResultUnusedInspection
PhpForeachArrayIsUsedAsValueInspection
PhpForeachNestedOuterKeyValueVariablesConflictInspection
PhpIllegalArrayKeyTypeInspection
PhpIncludeInspection
PhpInconsistentReturnPointsInspection
PhpInternalEntityUsedInspection
PhpLanguageLevelInspection
PhpMissingBreakStatementInspection
PhpParamsInspection
PhpPassByRefInspection
PhpRedundantClosingTagInspection
PhpSillyAssignmentInspection
PhpTraditionalSyntaxArrayLiteralInspection
PhpUndefinedCallbackInspection
PhpUndefinedClassConstantInspection
PhpUndefinedClassInspection
PhpUndefinedConstantInspection
PhpUndefinedFieldInspection
PhpUndefinedFunctionInspection
PhpUndefinedGotoLabelInspection
PhpUndefinedMethodInspection
PhpUndefinedNamespaceInspection
PhpUndefinedVariableInspection
PhpUnnecessaryFullyQualifiedNameInspection
PhpUnusedAliasInspection
PhpUnusedClassInspection
PhpUnusedFunctionInspection
PhpUnusedParameterInspection
PhpUnusedPrivateFieldInspection
PhpUnusedPrivateMethodInspection
PhpUsageOfSilenceOperatorInspection
PhpVoidFunctionResultUsedInspection
PhpWrongForeachArgumentTypeInspection
PhpAssignmentInConditionInspection
PhpConstantReassignmentInspection
PhpDivisionByZeroInspection
PhpNonCompoundUseInspection
PhpToStringImplementationInspection
PhpToStringReturnInspection
PhpWrongStringConcatenationInspection
PhpIllegalPsrClassPathInspection
PhpMultipleClassesDeclarationsInOneFile
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
@hadasbro
Copy link

hadasbro commented Aug 4, 2021

in case if we dont want to declare things strictly (e.g. some framework with no support e.g. legacy Phalcon)

PhpMissingReturnTypeInspection
PhpMissingParamTypeInspection
PhpMissingFieldTypeInspection

    public function setToken($token)
    {
        ... 
    }

@vinaykharayatced
Copy link

How to suppress "Multiple Definition exist for class 'class name'"?

@mingalevme
Copy link

How to suppress "Multiple Definition exist for class 'class name'"?

The only way I found - mark the unwanted definition (class/file) as plain/text via "override file type".

@jacobq
Copy link

jacobq commented May 18, 2022

FWIW, the one I was looking for (// noinspection NpmUsedModulesInstalled) wasn't in this list. To find it I grep'd my whole WebStorm install folder for one I knew existed (JSUnresolvedFunction) and found a match in WebStorm-201.6251.23/plugins/JavaScriptLanguage/lib/JavaScriptLanguage.jar: (searched using strings utility)

<localInspection
  groupPath="JavaScript and TypeScript"
  language="JavaScript"
  key="js.inspection.missing.module.dependency"
  groupKey="js.imports.dependencies.group.name"
  shortName="NpmUsedModulesInstalled"
  enabledByDefault="true"
  level="WEAK WARNING"
  implementationClass="com.intellij.lang.javascript.modules.NpmUsedModulesInstalledInspection"
/>
List of "shortName" attributes I found in META-INF/plugin.xml inside of JavaScriptLanguage.jar
AnonymousFunctionJS
AssignmentResultUsedJS
AssignmentToForLoopParameterJS
AssignmentToFunctionParameterJS
BadExpressionStatementJS
BlockStatementJS
BreakStatementJS
BreakStatementWithLabelJS
CallerJS
ChainedEqualityJS
ChainedFunctionCallJS
CommaExpressionJS
ConditionalExpressionJS
ConditionalExpressionWithIdenticalBranchesJS
ConfusingFloatingPointLiteralJS
ConfusingPlusesOrMinusesJS
ConstantConditionalExpressionJS
ConstantOnLHSOfComparisonJS
ConstantOnRHSOfComparisonJS
ContinueOrBreakFromFinallyBlockJS
ContinueStatementJS
ContinueStatementWithLabelJS
CyclomaticComplexityJS
DebuggerStatementJS
DefaultNotLastCaseInSwitchJS
DivideByZeroJS
DocumentWriteJS
DuplicateConditionJS
DynamicallyGeneratedCodeJS
EmptyCatchBlockJS
EmptyFinallyBlockJS
EmptyStatementBodyJS
EmptyTryBlockJS
ES6BindWithArrowFunction
ES6CheckImport
ES6ClassMemberInitializationOrder
ES6ConvertIndexedForToForOf
ES6ConvertLetToConst
ES6ConvertModuleExportToExport
ES6ConvertRequireIntoImport
ES6ConvertToForOf
ES6ConvertVarToLetConst
ES6DestructuringVariablesMerge
ES6MissingAwait
ES6PossiblyAsyncFunction
ES6PreferShortImport
ES6RedundantAwait
ES6RedundantNestingInTemplateLiteral
ES6ShorthandObjectProperty
ES6TopLevelAwaitExpression
ES6UnusedImports
ExceptionCaughtLocallyJS
FallThroughInSwitchStatementJS
FlowJSConfig
FlowJSCoverage
FlowJSFlagCommentPlacement
ForLoopReplaceableByWhileJS
ForLoopThatDoesntUseLoopVariableJS
FunctionNamingConventionJS
FunctionWithInconsistentReturnsJS
FunctionWithMultipleLoopsJS
FunctionWithMultipleReturnPointsJS
IfStatementWithIdenticalBranchesJS
IfStatementWithTooManyBranchesJS
IncompatibleMaskJS
IncrementDecrementResultUsedJS
InfiniteLoopJS
InfiniteRecursionJS
InnerHTMLJS
JSAccessibilityCheck
JSArrowFunctionBracesCanBeRemoved
JSAssignmentUsedAsCondition
JSBitwiseOperatorUsage
JSCheckFunctionSignatures
JSClassNamingConvention
JSClosureCompilerSyntax
JSCommentMatchesSignature
JSComparisonWithNaN
JSConsecutiveCommasInArrayLiteral
JSConstantReassignment
JSConstructorReturnsPrimitive
JSDeclarationsAtScopeStart
JSDeprecatedSymbols
JSDuplicateCaseLabel
JSDuplicatedDeclaration
JSEqualityComparisonWithCoercion
JSFileReferences
JSFunctionExpressionToArrowFunction
JSIncompatibleTypesComparison
JSJoinVariableDeclarationAndAssignment
JSJQueryEfficiency
JSLastCommaInArrayLiteral
JSLastCommaInObjectLiteral
JSMethodCanBeStatic
JSMismatchedCollectionQueryUpdate
JSMissingSwitchBranches
JSMissingSwitchDefault
JSNonASCIINames
JSNonStrictModeUsed
JSOctalInteger
JSPotentiallyInvalidConstructorUsage
JSPotentiallyInvalidTargetOfIndexedPropertyAccess
JSPotentiallyInvalidUsageOfClassThis
JSPotentiallyInvalidUsageOfThis
JSPrimitiveTypeWrapperUsage
JSRedundantSwitchStatement
JSReferencingMutableVariableFromClosure
JSRemoveUnnecessaryParentheses
JSStringConcatenationToES6Template
JSSuspiciousEqPlus
JSSuspiciousNameCombination
JSSwitchVariableDeclarationIssue
JSTypeOfValues
JSUndeclaredVariable
JSUndefinedPropertyAssignment
JSUnfilteredForInLoop
JSUnnecessarySemicolon
JSUnreachableSwitchBranches
JSUnresolvedExtXType
JSUnresolvedFunction
JSUnresolvedLibraryURL
JSUnresolvedReactComponent
JSUnresolvedVariable
JSUnusedAssignment
JSUnusedGlobalSymbols
JSUnusedLocalSymbols
JSUrlImportUsage
JSValidateJSDoc
JSValidateTypes
JSVoidFunctionReturnValueUsed
JSXNamespaceValidation
JSXSyntaxUsed
LabeledStatementJS
LocalVariableNamingConventionJS
LoopStatementThatDoesntLoopJS
MagicNumberJS
NegatedConditionalExpressionJS
NegatedIfStatementJS
NestedAssignmentJS
NestedConditionalExpressionJS
NestedFunctionCallJS
NestedFunctionJS
NestedSwitchStatementJS
NestingDepthJS
NodeCoreCodingAssistance
NonBlockStatementBodyJS
NpmUsedModulesInstalled
ObjectAllocationIgnoredJS
OverlyComplexArithmeticExpressionJS
OverlyComplexBooleanExpressionJS
PackageJsonMismatchedDependency
ParameterNamingConventionJS
ParametersPerFunctionJS
PlatformDetectionJS
PointlessArithmeticExpressionJS
PointlessBitwiseExpressionJS
PointlessBooleanExpressionJS
ReplaceAssignmentWithOperatorAssignmentJS
ReservedWordUsedAsNameJS
ReturnFromFinallyBlockJS
ReuseOfLocalVariableJS
ShiftOutOfRangeJS
SillyAssignmentJS
StatementsPerFunctionJS
StringLiteralBreaksHTMLJS
SuspiciousTypeOfGuard
TailRecursionJS
TextLabelInSwitchStatementJS
ThisExpressionReferencesGlobalObjectJS
ThreeNegationsPerFunctionJS
ThrowFromFinallyBlockJS
TrivialConditionalJS
TrivialIfJS
TypeScriptAbstractClassConstructorCanBeMadeProtected
TypeScriptCheckImport
TypeScriptDuplicateUnionOrIntersectionType
TypeScriptExplicitMemberType
TypeScriptFieldCanBeMadeReadonly
TypeScriptMissingAugmentationImport
TypeScriptRedundantGenericType
TypeScriptSmartCast
TypeScriptSuspiciousConstructorParameterAssignment
TypeScriptUMDGlobal
TypeScriptUnresolvedFunction
TypeScriptUnresolvedReactComponent
TypeScriptUnresolvedVariable
TypeScriptValidateGenericTypes
TypeScriptValidateJSTypes
TypeScriptValidateTypes
UnnecessaryContinueJS
UnnecessaryLabelJS
UnnecessaryLabelOnBreakStatementJS
UnnecessaryLabelOnContinueStatementJS
UnnecessaryLocalVariableJS
UnnecessaryReturnJS
UnreachableCodeJS
UnterminatedStatementJS
UnusedCatchParameterJS
UpdateDependencyToLatestVersion
VoidExpressionJS
WebpackConfigHighlighting
WithStatementJS
XHTMLIncompatabilitiesJS

(The entry for js.inspection.promise.ignored.display.name didn't appear to have a shortName defined, but maybe it's JSIgnoredPromiseFromCallInspection?)

@sasha-
Copy link

sasha- commented May 30, 2022

Adding list of SQL inspections from Database Tools plugin

SqlResolve
SqlType
SqlUnused
SqlUnused
SqlIdentifier
SqlAmbiguousColumn
SqlInsertValues
SqlDerivedTableAlias
SqlShouldBeInGroupBy
SqlConstantCondition
SqlAutoIncrementDuplicate
SqlDropIndexedColumn
SqlAddNotNullColumn
SqlCheckUsingColumns
SqlNullComparison
SqlSignature
SqlSideEffects
SqlWithoutWhere
SqlJoinWithoutOn
SqlUnreachable
SqlIllegalCursorState
SqlNamedArguments
SqlGoto
SqlTriggerTransition
SqlRedundantOrderingDirection
SqlAggregates
SqlCaseVsIf
SqlCaseVsCoalesce
SqlStringLengthExceeded
SqlRedundantAlias
SqlRedundantLimit
SqlMultipleLimitClauses
SqlInsertIntoGeneratedColumn
SqlDuplicateColumn
SqlRedundantElseNull
SqlInsertNullIntoNotNull
SqlRedundantCodeInCoalesce
SqlUnicodeStringLiteral
SqlUnusedCte
SqlMissingColumnAliases
SqlMisleadingReference
SqlMissingReturn
SqlTransactionStatementInTrigger
SqlCallNotation
SqlDeprecateType
SqlShadowingAlias
SqlDateTime
SqlConstantExpression

@noinspection SqlResolve
help with "select from $table.." where $table is generated string so inspection cannot guess it

@noinspection SqlAggregates
solves bug complaining about fields in ORDER BY having to be aggregated for grouped queries.

@jyxjjj
Copy link

jyxjjj commented Aug 8, 2022

PhpSameParameterValueInspection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment