qdk
qdk copied to clipboard
Q# New Lints Ideas/Proposals
This issue is a place to gather ideas/proposals for new lints.
Future lints:
- Dead Code
- Shadowing a mutable variable with an immutable variable of the same type
- Having a callable named
Mainand a separate callable with the@EntryPoint()attribute can be confusing to readers - Variable declared as
mutablebut never updated can be switched toletdeclaration.
Quantum Specific Lints:
- Gates that are identities if they are squared.
- Measure a qubit that hasn't had gates applied to it.
- Don't reset qubits when it is not needed.
- Operations that don't manipulate qubits can be functions instead of operations.
- When qubit reuse is not supported, prefer
MResetZoverM - Operations with implemented specializations that are missing from the signature.
- Use of deprecated
usingsyntax could have lint that suggestsusesyntax
RCA Lints:
- Avoid callables that can only be resolved at runtime, aka
CallToUnresolvedCallee
Current Lints:
DivisionByZeroNeedlessParensRedundantSemicolons
@orpuente-MS please assign the task to me!