bash lexer incorrect detection of heredoc
Open
Nobody has claimed this yet.
S-major
T-bug
X-imported
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 885
- PR merge metrics
- No merged PRs in 30d
Description
(Original issue 1364 created by 0e4ef622 on 2017-07-23T01:32:31.754829+00:00)
When bit shifting to the left, if the right operand occurs again in the script, the shift is incorrectly identified as a heredoc.
#!bash
# ok
$(( 1 << 3 ))
$(( 1 << 4 ))
#!bash
# not ok
$(( 1 << 3 ))
$(( 1 << 3 ))
Contributor guide
No contributing guide indexed for this repository
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
Start with Pygments' bash lexer and reproduce the two arithmetic-shift snippets from the issue, comparing cases where the right operand is repeated. Done means repeated operands in left-shift expressions are not detected as heredocs, while genuine heredoc syntax remains correctly recognized.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100