-
Notifications
You must be signed in to change notification settings - Fork 311
Open
Labels
enhancementFeature requests, or enhancements to existing features. Ideas. Anything within the project's scope.Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope.feature-inspectionsup-for-grabsUse this label in conjunction with a difficulty level label, e.g. difficulty-02-duckyUse this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky
Milestone
Description
What
Flag precompiler directives involving a Not
operator flipping a precompiler constant.
Why
Truthy value is 1, which yields unexpected results when a Not
operator gets involved.
Example
This code should trigger the inspection:
#If Not Win64 Then ' expression is always true
#EndIf
QuickFixes
-
Use Explicit Equality Check
Example code, after quickfix is applied:
#If Win64 = 0 Then #EndIf
Resources
Each inspection needs a number of resource strings - please provide a suggestion here:
- PrecompilerConditionAlwaysTrue: the name of the inspection, as it appears in the inspection settings.
- InspectionInfo: precompiler constants have a truthy value of 1, which makes 'Not' operators yield an unexpected non-zero, truthy value: the expression is always true.
- InspectionResults: Precompiler expression '{0}' is always true
Metadata
Metadata
Assignees
Labels
enhancementFeature requests, or enhancements to existing features. Ideas. Anything within the project's scope.Feature requests, or enhancements to existing features. Ideas. Anything within the project's scope.feature-inspectionsup-for-grabsUse this label in conjunction with a difficulty level label, e.g. difficulty-02-duckyUse this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky