microsoft / microsoft/vscode-makefile-tools
fix comment toggling
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 242
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
When I toggle on comments in makefile tasks with editor.action.commentLine, then I want the # to appear at the very start of the line, not nested after a tab.
make, unlike other common scripting languages, treats /^\t#...$/ as an actual command to send to the shell interpreter. Which produces ugly traces on UNIX terminals, and syntax errors on Command Prompt terminals.
When enabling comments for commands in a makefile rule, please stop the usual indentation and whitespace behavior, and just insert #\t at the very start of the line. When disabling comments, drop the # prefix from the start of the line.
Examples
Bad:
all:
# @rustup component add clippy
Good:
all:
# @rustup component add clippy
Commenting other regions of a makefile are probably fine with the existing behavior.
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
Locate the handling of editor.action.commentLine for Makefile task commands and reproduce the issue with the provided makefile examples. Ensure enabling comments produces #\t at the line start and disabling comments removes that prefix, while other Makefile regions retain existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100