HaxeFoundation / HaxeFoundation/haxe

[display] "This code has no effect" diagnostics should be DKRemovableCode

Open
#7,294 1 comment 0 reactions 1 assignee Claimed by @Simn View on GitHub
feature-ide
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

"This code has no effect" diagnostics currently seem to use `DKCompilerError`, which doesn't seem right semantically. This also means there's no "Remove" code action because no range to remove is provided, for instance in a case like this:

```haxe
class Main {
static public function main() {
"unused string literal";
}
}
```

```json
[{"file":"HaxeRepro\\source\\Main.hx","diagnostics":[{"kind":2,"severity":2,"range":{"start":{"line":2,"character":2},"end":{"line":2,"character":25}},"args":"This code has no effect"}]}]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.