Add stubs for missing method overrides
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript, vscode
- Domain
- developer-experience, devtools
Research direction
The issue names no implementation files or tests. Start by locating the VS Code extension entry point for class-related actions and the CodeQL language-service support for abstract methods; compare with how Java IDEs generate override stubs. Done means the command inserts correctly formatted stubs for every missing abstract method, including multiple abstract base classes.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
I'm always frustrated when subclassing an abstract class in QL, since I need to manually write out names and signatures of abstract methods I must implement.
And all the while, my IDE is laughing at my struggle, since it knows what I need to do (with the <YourClass> must implement abstract method: <methodName> errors).
I usually go to the abstract base class and use multiple-cursors on the abstract part, but with multiple base classes that are abstract, even this process becomes tedious.
Describe the solution you'd like
class MyClass extends AbstracClass {
MyClass() { this = foo() }
}
Right-click the MyClass part of class MyClass, select Add stubs for missing method overrides, and the above code is extended to become
class MyClass extends AbstracClass {
MyClass() { this = foo() }
override string method1(int arg) {
// TODO: this is a stub
none()
}
override method2() {
// TODO: this is a stub
none()
}
}
I think this is very common in Java, so we might be able to borrow how the stubs are populated from there (like how the TODO comment is formulated).
Describe alternatives you've considered
N/A
Additional context
N/A
- Dominant language
- TypeScript
- Stars
- 539
- Forks
- 240
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 29
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.
More from github/vscode-codeql
-
bug VSCode
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/vscode-codeql#4471 · 1 comment ·
-
bug enhancement VSCode
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/vscode-codeql#592 · 2 comments ·
-
enhancement VSCode
Difficulty 3/5 1-2 days Newbie friendliness 55/100
github/vscode-codeql#4432 · 1 comment ·
-
bug VSCode
Difficulty 3/5 1-2 days Newbie friendliness 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
Difficulty 3/5 1-2 days Newbie friendliness 64/100
github/vscode-codeql#4339 · 1 comment ·
All issues in github/vscode-codeql
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fil-donadoni/tolaria#4409 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
corsairdev/corsair#1764 ·