Q# New Lints Ideas/Proposals
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1k
- Forks
- 212
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 65
Description
This issue is a place to gather ideas/proposals for new lints.
## Lint ideas:
- Dead Code
- Shadowing a mutable variable with an immutable variable of the same type
- Having a callable named `Main` and a separate callable with the `@EntryPoint()` attribute can be confusing to readers
- Variable declared as `mutable` but never updated can be switched to `let` declaration.
Quantum Specific Lints:
- Sequence of gates that are equivalent to the identity gate.
- 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 `MResetZ` over `M`
- Operations with implemented specializations that are missing from the signature.
- Use of deprecated `using` syntax could have lint that suggests `use` syntax
RCA Lints:
- Avoid callables that can only be resolved at runtime, aka `CallToUnresolvedCallee`
## Current Lints:
- `DivisionByZero`
- `NeedlessParens`
- `RedundantSemicolons`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the proposed lint ideas and compare them with the current lints listed in the issue. No file, test, or entry point is identified, so a specific lint and implementation scope must be selected before work can begin. Done would require a concrete proposal with a defined implementation and validation plan.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100