Skip to content

Commit 589f8b5

Browse files
committed
chore: lints
1 parent af326ab commit 589f8b5

35 files changed

+79
-78
lines changed

src/main/kotlin/com/github/aleksandrsl/intellijluau/LuauCommenter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ class LuauCommenter : Commenter, IndentedCommenter {
1414

1515
override fun getCommentedBlockCommentSuffix() = null
1616

17-
override fun forceIndentedLineComment() = true
17+
override fun forceIndentedLineComment() = true
1818
}

src/main/kotlin/com/github/aleksandrsl/intellijluau/LuauFileType.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package com.github.aleksandrsl.intellijluau
33
import com.intellij.openapi.fileTypes.LanguageFileType
44
import javax.swing.Icon
55

6-
object LuauFileType: LanguageFileType(LuauLanguage.INSTANCE) {
6+
object LuauFileType : LanguageFileType(LuauLanguage.INSTANCE) {
77
override fun getName(): String {
88
return "Luau File"
99
}

src/main/kotlin/com/github/aleksandrsl/intellijluau/LuauIcons.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ import com.intellij.openapi.util.IconLoader
55
object LuauIcons {
66

77
@JvmField
8-
val FILE = IconLoader.getIcon("/icons/luau.svg", LuauIcons::class.java);
8+
val FILE = IconLoader.getIcon("/icons/luau.svg", LuauIcons::class.java)
99
}

src/main/kotlin/com/github/aleksandrsl/intellijluau/LuauLanguage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package com.github.aleksandrsl.intellijluau
22

33
import com.intellij.lang.Language
44

5-
class LuauLanguage: Language("Luau") {
5+
class LuauLanguage : Language("Luau") {
66
companion object {
77
val INSTANCE = LuauLanguage()
88
}

src/main/kotlin/com/github/aleksandrsl/intellijluau/LuauTokenSets.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,21 @@ object LuauTokenSets {
2929
// Luau type cast operator
3030
DOUBLE_COLON,
3131
)
32+
3233
// Quote handler expects all symbols that represent strings' quotes to be present.
3334
// I have zero idea how it decides which one is opening and which one is closing if I'm just passing the set.
3435
// Probably it just makes a decision based on the presence of any token from the set before?
3536
// But it also should know what is the closed string, whatever it works ok so far.
3637
val STRINGS = TokenSet.create(STRING, TEMPLATE_STRING_SQUOTE, TEMPLATE_STRING_EQUOTE)
37-
val ASSIGN_OPERATORS = TokenSet.create(ASSIGN, DIV_EQ, MULT_EQ, PLUS_EQ, MINUS_EQ, EXP_EQ, CONCAT_EQ, DOUBLE_DIV_EQ, MOD_EQ)
38+
val ASSIGN_OPERATORS =
39+
TokenSet.create(ASSIGN, DIV_EQ, MULT_EQ, PLUS_EQ, MINUS_EQ, EXP_EQ, CONCAT_EQ, DOUBLE_DIV_EQ, MOD_EQ)
3840
val ADDITIVE_OPERATORS = TokenSet.create(PLUS, MINUS)
3941
val MULTIPLICATIVE_OPERATORS = TokenSet.create(DIV, MULT, DOUBLE_DIV, MOD)
4042
val BINARY_LOGICAL_OPERATORS = TokenSet.create(AND, OR)
4143
val EQUALITY_OPERATORS = TokenSet.create(EQ, NE)
4244
val RELATIONAL_OPERATORS = TokenSet.create(GT, GE, LT, LE)
4345
val GENERICS_HOLDERS = TokenSet.create(FUNC_TYPE_PARAMS, TYPE_REFERENCE, TYPE_DECLARATION_STATEMENT)
4446

45-
val FUNCTION_TYPE_RECOVERY = TokenSet.create(LOCAL, FUNCTION, END, RETURN, WHILE, IF, ELSE, ELSEIF, REPEAT, UNTIL, EXPORT_SOFT_KEYWORD, TYPE)
47+
val FUNCTION_TYPE_RECOVERY =
48+
TokenSet.create(LOCAL, FUNCTION, END, RETURN, WHILE, IF, ELSE, ELSEIF, REPEAT, UNTIL, EXPORT_SOFT_KEYWORD, TYPE)
4649
}

src/main/kotlin/com/github/aleksandrsl/intellijluau/actions/CreateLuauFileAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.github.aleksandrsl.intellijluau.actions;
1+
package com.github.aleksandrsl.intellijluau.actions
22

33
import com.github.aleksandrsl.intellijluau.LuauBundle
44
import com.github.aleksandrsl.intellijluau.LuauIcons

src/main/kotlin/com/github/aleksandrsl/intellijluau/actions/LuauExternalFormatAction.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@ class LuauExternalFormatAction : AnAction() {
4949
"File formatted",
5050
NotificationType.INFORMATION
5151
)
52-
.notify(project);
52+
.notify(project)
53+
5354
is StyLuaCli.FormatResult.StyluaError -> notificationGroupManager.createNotification(
5455
result.msg,
5556
NotificationType.ERROR
5657
)
57-
.notify(project);
58+
.notify(project)
59+
5860
null -> null
5961
}
6062
}

src/main/kotlin/com/github/aleksandrsl/intellijluau/actions/LuauExternalFormatOnSaveAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class LuauExternalFormatOnSaveAction : ActionsOnSaveFileDocumentManagerListener.
5555
if (result is StyLuaCli.FormatResult.StyluaError) {
5656
LuauNotifications
5757
.pluginNotifications()
58-
.createNotification("StyLua Error", result.msg, NotificationType.ERROR)
58+
.createNotification("StyLua error", result.msg, NotificationType.ERROR)
5959
.addAction(NotificationAction.createSimple("Open settings") {
6060
ShowSettingsUtil.getInstance().showSettingsDialog(project, ProjectSettingsConfigurable::class.java)
6161
})

src/main/kotlin/com/github/aleksandrsl/intellijluau/cli/LuauCliService.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@ import kotlinx.coroutines.CoroutineScope
88
class LuauCliService(
99
private val project: Project,
1010
val coroutineScope: CoroutineScope
11-
) {
12-
13-
}
11+
)

src/main/kotlin/com/github/aleksandrsl/intellijluau/cli/StyLuaCli.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class StyLuaCli(private val styLuaExecutablePath: Path) {
4040
val stdin = content
4141
if (stdin.isNullOrEmpty()) return null
4242
// Consider using ExecUtil
43-
val charset = Charsets.UTF_8;
43+
val charset = Charsets.UTF_8
4444
val commandLine = GeneralCommandLine().apply {
4545
withParentEnvironmentType(GeneralCommandLine.ParentEnvironmentType.CONSOLE)
4646
// Seems that it's null by default
@@ -71,7 +71,7 @@ class StyLuaCli(private val styLuaExecutablePath: Path) {
7171
}
7272

7373
fun createOsProcessHandler(project: Project, file: VirtualFile): OSProcessHandler {
74-
val charset = Charsets.UTF_8;
74+
val charset = Charsets.UTF_8
7575
val commandLine = GeneralCommandLine().apply {
7676
withParentEnvironmentType(GeneralCommandLine.ParentEnvironmentType.CONSOLE)
7777
// Seems that it's null by default

0 commit comments

Comments
 (0)