Skip to content

Commit 370ac1a

Browse files
committed
Fix invalid symbol file inspection reporting an error for commands.sym
1 parent c8cf487 commit 370ac1a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [Unreleased]
44
### Fixed
55
- Fix regular expressions not being allowed in hook transmits list.
6+
- Fix invalid symbol file inspection reporting an error for "commands.sym".
67

78
### Changed
89
- Inspections that require symbols will no longer run on files outside the project.

src/main/kotlin/io/runescript/plugin/ide/inspections/RuneScriptInvalidSymbolFileInspection.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ class RuneScriptInvalidSymbolFileInspection : LocalInspectionTool() {
2525
}
2626
val name = file.containingFile.name
2727
val typeName = name.substring(0, name.indexOf('.'))
28+
if (typeName == "commands") {
29+
// Technically this is not a type, but is required by the compiler.
30+
return null;
31+
}
2832
if (RsPrimitiveType.lookupOrNull(typeName) == null) {
2933
return arrayOf(
3034
manager.createProblemDescriptor(

0 commit comments

Comments
 (0)