-
Notifications
You must be signed in to change notification settings - Fork 301
ObsoleteTypeHintInspection
Description: Use of obsolete type hints in identifier
Type: CodeInspectionType.LanguageOpportunities
Default severity: CodeInspectionSeverity.Hint
This inspection finds declarations that specify the type using a type hint character. These type hints are seldom encountered, and have been replaced with As
type clauses, which explicitly specify an identifier's type by its name. Using type hints hinder readability and maintainability, because unless the maintainer knows what type a type hint character stands for, a variable's type must be looked up.
The type of foo
is String
, because type hint $
specifies a String
:
Dim foo$
This code is unnecessarily obfuscated. Unless the maintainer knows what the type hint characters are and what type they stand for, one would have to lookup the type hint or locate usages of foo
to know what its type is.
This inspection has no quickfix implemented in version 1.2; future versions may include one.
rubberduckvba.com
© 2014-2021 Rubberduck project contributors
- Contributing
- Build process
- Version bump
- Architecture Overview
- IoC Container
- Parser State
- The Parsing Process
- How to view parse tree
- UI Design Guidelines
- Strategies for managing COM object lifetime and release
- COM Registration
- Internal Codebase Analysis
- Projects & Workflow
- Adding other Host Applications
- Inspections XML-Doc
-
VBE Events