File tree Expand file tree Collapse file tree 3 files changed +24
-10
lines changed
lib/src/commonMain/kotlin/im/tox/tox4j/exceptions Expand file tree Collapse file tree 3 files changed +24
-10
lines changed Original file line number Diff line number Diff line change 3232 runs-on : ubuntu-22.04
3333 steps :
3434 - uses : actions/checkout@v4
35- - run : curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.1 .1/ktlint && chmod a+x ktlint
35+ - run : curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.49 .1/ktlint && chmod a+x ktlint
3636 - run : ./ktlint
Original file line number Diff line number Diff line change 11load ("@rules_cc//cc:defs.bzl" , "cc_binary" , "cc_proto_library" )
22load ("@rules_java//java:defs.bzl" , "java_proto_library" )
33load ("@rules_kotlin//kotlin:jvm.bzl" , "kt_jvm_library" , "kt_jvm_test" )
4+ load ("@rules_kotlin//kotlin:lint.bzl" , "ktlint_fix" , "ktlint_test" )
45load ("@rules_proto//proto:defs.bzl" , "proto_library" )
56load ("//tools/project:build_defs.bzl" , "project" )
67
@@ -95,3 +96,13 @@ kt_jvm_test(
9596 "@maven//:org_jetbrains_kotlinx_kotlinx_coroutines_core" ,
9697 ],
9798)
99+
100+ ktlint_fix (
101+ name = "ktlint_fix" ,
102+ srcs = glob (["**/*.kt" ]),
103+ )
104+
105+ ktlint_test (
106+ name = "ktlint_test" ,
107+ srcs = glob (["**/*.kt" ]),
108+ )
Original file line number Diff line number Diff line change 11package im.tox.tox4j.exceptions
22
3- abstract class ToxException constructor(val code : Enum <* >, private val extraMessage : String ) :
4- Exception (extraMessage) {
5- final override val message: String
6- get() =
7- when (extraMessage) {
8- " " -> " Error code: " + code.name
9- else -> extraMessage + " , error code: " + code.name
10- }
11- }
3+ abstract class ToxException
4+ constructor (
5+ val code: Enum <* >,
6+ private val extraMessage: String ,
7+ ) : Exception (extraMessage) {
8+ final override val message: String
9+ get() =
10+ when (extraMessage) {
11+ " " -> " Error code: " + code.name
12+ else -> extraMessage + " , error code: " + code.name
13+ }
14+ }
You can’t perform that action at this time.
0 commit comments