Unclosed Block Comments Show Wrong Line Number in Error

Open Beginner friendly
#8,953 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java
Domain
backend

Research direction

Start by finding the parser code that detects unclosed block comments and reports their opening line; the issue does not name a file or test. Reproduce with the two snippets in the report and trace how preceding structures affect the reported line. Done when both examples report the actual line where ### opens, with a regression test covering the cases.

Written by the indexing model from the issue text.

Description

bug priority: lowest
Skript/Server Version
[Skript] Server Version: Paper 26.2 #134 (3e24be0)
 [Skript] Skript Version: 2.17.1 (selfbuilt-unknown)
 [Skript] Installed Skript Addons:
  - skript-reflect v2.6.3 (https://github.com/SkriptLang/skript-reflect)
 [Skript] Installed dependencies:
  - Vault v1.7.3-b131
Bug Description
###
a

A block comment (###) was opened on line -1 but never closed.

The issue isn't limited to the first line of the file, it can also report "line 1" when there are other structures

on load:
  stop

###
a
Expected Behavior

It should display the correct line number in the error

Steps to Reproduce
Errors or Screenshots

No response

Other

No response

Agreement
  • I have read the guidelines above and affirm I am following them with this report.
Dominant language
Java
Stars
1.3k
Forks
456
Avg merge
4d 10h
Merged PRs (30d)
7

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SkriptLang/Skript

All issues in SkriptLang/Skript

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.