-
Notifications
You must be signed in to change notification settings - Fork 110
Expand file tree
/
Copy pathdiagnosticRules.ts
More file actions
125 lines (122 loc) · 6.58 KB
/
diagnosticRules.ts
File metadata and controls
125 lines (122 loc) · 6.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*
* diagnosticRules.ts
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT license.
* Author: Eric Traut
*
* Strings that represent each of the diagnostic rules
* that can be enabled or disabled in the configuration.
*/
// Not const enum since keys need to be inspected in tests
// to match declaration of user-visible settings in package.json
export enum DiagnosticRule {
strictListInference = 'strictListInference',
strictSetInference = 'strictSetInference',
strictDictionaryInference = 'strictDictionaryInference',
analyzeUnannotatedFunctions = 'analyzeUnannotatedFunctions',
strictParameterNoneValue = 'strictParameterNoneValue',
enableBasedFeatures = 'enableBasedFeatures',
enableExperimentalFeatures = 'enableExperimentalFeatures',
enableTypeIgnoreComments = 'enableTypeIgnoreComments',
enableReachabilityAnalysis = 'enableReachabilityAnalysis',
deprecateTypingAliases = 'deprecateTypingAliases',
disableBytesTypePromotions = 'disableBytesTypePromotions',
reportGeneralTypeIssues = 'reportGeneralTypeIssues',
reportPropertyTypeMismatch = 'reportPropertyTypeMismatch',
reportFunctionMemberAccess = 'reportFunctionMemberAccess',
reportMissingImports = 'reportMissingImports',
reportMissingModuleSource = 'reportMissingModuleSource',
reportInvalidTypeForm = 'reportInvalidTypeForm',
reportMissingTypeStubs = 'reportMissingTypeStubs',
reportImportCycles = 'reportImportCycles',
reportUnusedImport = 'reportUnusedImport',
reportUnusedClass = 'reportUnusedClass',
reportUnusedFunction = 'reportUnusedFunction',
reportUnusedVariable = 'reportUnusedVariable',
reportDuplicateImport = 'reportDuplicateImport',
reportWildcardImportFromLibrary = 'reportWildcardImportFromLibrary',
reportAbstractUsage = 'reportAbstractUsage',
reportExplicitAbstractUsage = 'reportExplicitAbstractUsage',
reportArgumentType = 'reportArgumentType',
reportAssertTypeFailure = 'reportAssertTypeFailure',
reportAssignmentType = 'reportAssignmentType',
reportAttributeAccessIssue = 'reportAttributeAccessIssue',
reportCallIssue = 'reportCallIssue',
reportInconsistentOverload = 'reportInconsistentOverload',
reportIndexIssue = 'reportIndexIssue',
reportInvalidTypeArguments = 'reportInvalidTypeArguments',
reportNoOverloadImplementation = 'reportNoOverloadImplementation',
reportOperatorIssue = 'reportOperatorIssue',
reportOptionalSubscript = 'reportOptionalSubscript',
reportOptionalMemberAccess = 'reportOptionalMemberAccess',
reportOptionalCall = 'reportOptionalCall',
reportOptionalIterable = 'reportOptionalIterable',
reportOptionalContextManager = 'reportOptionalContextManager',
reportOptionalOperand = 'reportOptionalOperand',
reportRedeclaration = 'reportRedeclaration',
reportReturnType = 'reportReturnType',
reportTypedDictNotRequiredAccess = 'reportTypedDictNotRequiredAccess',
reportUntypedFunctionDecorator = 'reportUntypedFunctionDecorator',
reportUntypedClassDecorator = 'reportUntypedClassDecorator',
reportUntypedBaseClass = 'reportUntypedBaseClass',
reportUntypedNamedTuple = 'reportUntypedNamedTuple',
reportPrivateUsage = 'reportPrivateUsage',
reportTypeCommentUsage = 'reportTypeCommentUsage',
reportPrivateImportUsage = 'reportPrivateImportUsage',
reportConstantRedefinition = 'reportConstantRedefinition',
reportDeprecated = 'reportDeprecated',
reportIncompatibleMethodOverride = 'reportIncompatibleMethodOverride',
reportIncompatibleVariableOverride = 'reportIncompatibleVariableOverride',
reportInconsistentConstructor = 'reportInconsistentConstructor',
reportOverlappingOverload = 'reportOverlappingOverload',
reportPossiblyUnboundVariable = 'reportPossiblyUnboundVariable',
reportMissingSuperCall = 'reportMissingSuperCall',
reportUninitializedInstanceVariable = 'reportUninitializedInstanceVariable',
reportInvalidStringEscapeSequence = 'reportInvalidStringEscapeSequence',
reportUnknownParameterType = 'reportUnknownParameterType',
reportUnknownArgumentType = 'reportUnknownArgumentType',
reportUnknownLambdaType = 'reportUnknownLambdaType',
reportUnknownVariableType = 'reportUnknownVariableType',
reportUnknownMemberType = 'reportUnknownMemberType',
reportMissingParameterType = 'reportMissingParameterType',
reportMissingTypeArgument = 'reportMissingTypeArgument',
reportInvalidTypeVarUse = 'reportInvalidTypeVarUse',
reportCallInDefaultInitializer = 'reportCallInDefaultInitializer',
reportUnnecessaryIsInstance = 'reportUnnecessaryIsInstance',
reportUnnecessaryCast = 'reportUnnecessaryCast',
reportUnnecessaryComparison = 'reportUnnecessaryComparison',
reportUnnecessaryContains = 'reportUnnecessaryContains',
reportAssertAlwaysTrue = 'reportAssertAlwaysTrue',
reportSelfClsParameterName = 'reportSelfClsParameterName',
reportImplicitStringConcatenation = 'reportImplicitStringConcatenation',
reportUndefinedVariable = 'reportUndefinedVariable',
reportUnboundVariable = 'reportUnboundVariable',
reportUnhashable = 'reportUnhashable',
reportInvalidStubStatement = 'reportInvalidStubStatement',
reportIncompleteStub = 'reportIncompleteStub',
reportUnsupportedDunderAll = 'reportUnsupportedDunderAll',
reportUnusedCallResult = 'reportUnusedCallResult',
reportUnusedCoroutine = 'reportUnusedCoroutine',
reportUnusedExcept = 'reportUnusedExcept',
reportUnusedExpression = 'reportUnusedExpression',
reportUnnecessaryTypeIgnoreComment = 'reportUnnecessaryTypeIgnoreComment',
reportMatchNotExhaustive = 'reportMatchNotExhaustive',
reportUnreachable = 'reportUnreachable',
reportImplicitOverride = 'reportImplicitOverride',
// basedpyright options:
failOnWarnings = 'failOnWarnings',
strictGenericNarrowing = 'strictGenericNarrowing',
reportAny = 'reportAny',
reportExplicitAny = 'reportExplicitAny',
reportIgnoreCommentWithoutRule = 'reportIgnoreCommentWithoutRule',
reportPrivateLocalImportUsage = 'reportPrivateLocalImportUsage',
reportImplicitRelativeImport = 'reportImplicitRelativeImport',
reportInvalidCast = 'reportInvalidCast',
reportUnsafeMultipleInheritance = 'reportUnsafeMultipleInheritance',
reportUnusedParameter = 'reportUnusedParameter',
reportImplicitAbstractClass = 'reportImplicitAbstractClass',
reportUnannotatedClassAttribute = 'reportUnannotatedClassAttribute',
reportIncompatibleUnannotatedOverride = 'reportIncompatibleUnannotatedOverride',
reportInvalidAbstractMethod = 'reportInvalidAbstractMethod',
reportSelfClsDefault = 'reportSelfClsDefault',
}