Skip to content

Commit 52274b6

Browse files
authored
Do not mark tests as unused and extend compatibility (#24)
1 parent f75e25b commit 52274b6

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
## [Unreleased]
66

7+
## [1.0.2] - 2025-03-19
8+
- Add RustRover and WebStorm to the compatible IDEs.
9+
- Do not highlight tests as unused.
10+
711
## [1.0.1] - 2025-02-01
812

913
- Do not highlight `value` as error if used as identifier.

build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import org.jetbrains.changelog.Changelog
22
import org.jetbrains.changelog.markdownToHTML
3+
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
34
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
45

56
plugins {
@@ -122,6 +123,9 @@ intellijPlatform {
122123
pluginVerification {
123124
ides {
124125
recommended()
126+
// Configure IDEs that are not automatically recommended
127+
ide(IntelliJPlatformType.RustRover,"2024.3")
128+
ide(IntelliJPlatformType.WebStorm, "2024.3")
125129
}
126130
}
127131
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pluginGroup = com.github.com.cakevm.intellij_huff_plugin
44
pluginName = IntelliJ Huff Plugin
55
pluginRepositoryUrl = https://github.com/cakevm/intellij-huff-plugin
66
# SemVer format -> https://semver.org
7-
pluginVersion = 1.0.1
7+
pluginVersion = 1.0.2
88

99
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1010
pluginSinceBuild = 242

src/main/grammars/HuffParser.bnf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ HuffBoolMapping ::= BOOLEANLITERAL
218218
MacroStatement ::= HEXCODE | OpcodeName | NAT_SPEC_TAG | HuffBoolMapping | MacroLabel | MacroConstantReference
219219
| BuiltinFn | MacroParameterReference | MacroLabelGoTo
220220
MacroBody ::= L_BRACE MacroStatement* R_BRACE
221-
// #define macro/fn
222-
MacroType ::= (MACRO | FN | TEST)
221+
// #define macro/fn/test
222+
MacroType ::= MACRO | FN | TEST
223223
MacroDefinition ::= TestDecorator? DEFINE MacroType MacroIdentifier MacroParameters EQUAL MacroTakesParameters? MacroReturnsParameters? MacroBody
224224
{
225225
implements = "com.github.com.cakevm.intellij_huff_plugin.language.psi.element.HuffCallableElement"

src/main/kotlin/com/github/com/cakevm/intellij_huff_plugin/ide/inspection/HuffUnusedElementInspection.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class HuffUnusedElementInspection : LocalInspectionTool() {
2727
}
2828

2929
override fun visitMacroDefinition(o: HuffMacroDefinition) {
30-
if (defaultMacros[o.name] == null) {
30+
if (defaultMacros[o.name] == null && o.macroType.text == "macro") {
3131
o.macroIdentifier.checkForUsage(o, holder, "Macro '${o.name}' is never used")
3232
}
3333
}

0 commit comments

Comments
 (0)