File tree Expand file tree Collapse file tree 10 files changed +16
-16
lines changed
tool/src/main/kotlin/org/spongepowered/configurate/tool Expand file tree Collapse file tree 10 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ fun createLoader(source: Path): ConfigurationLoader<*> {
3030 .defaultOptions {
3131 it.serializers { s ->
3232 s.registerAnnotatedObjects(
33- ObjectMapper .factoryBuilder().addDiscoverer(dataClassFieldDiscoverer()).build(),
33+ ObjectMapper .factoryBuilder().addDiscoverer(dataClassFieldDiscoverer()).build()
3434 )
3535 }
3636 }
Original file line number Diff line number Diff line change @@ -26,13 +26,13 @@ import org.spongepowered.configurate.ConfigurationOptions
2626/* * Create a new basic configuration node, optionally providing options. */
2727fun node (
2828 options : ConfigurationOptions = ConfigurationOptions .defaults(),
29- init : BasicConfigurationNode .() -> Unit
29+ init : BasicConfigurationNode .() -> Unit ,
3030): BasicConfigurationNode = BasicConfigurationNode .root<RuntimeException >(options, init )
3131
3232/* * Create a commented configuration node. */
3333fun commented (
3434 options : ConfigurationOptions = ConfigurationOptions .defaults(),
35- init : CommentedConfigurationNode .() -> Unit
35+ init : CommentedConfigurationNode .() -> Unit ,
3636): CommentedConfigurationNode = CommentedConfigurationNode .root<RuntimeException >(options, init )
3737
3838/* *
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ private object DataClassFieldDiscoverer : FieldDiscoverer<MutableMap<KParameter,
107107 combinedAnnotations(
108108 param.type.javaElement,
109109 param.javaElement,
110- field.javaField
110+ field.javaField,
111111 ), // type, backing field, etc
112112 // deserializer
113113 { intermediate, arg, implicitProvider ->
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ operator fun <N : ConfigurationNode> ConfigurationNodeFactory<N>.invoke(
3131 */
3232fun <T : ConfigurationNode > ConfigurationNodeFactory<T>.node (
3333 options : ConfigurationOptions = this.defaultOptions(),
34- init : T .() -> Unit
34+ init : T .() -> Unit ,
3535): T {
3636 val ret = createNode(options)
3737 ret.init ()
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import org.spongepowered.configurate.NodePath
2323// TODO: Deprecated due to being added directly to class, make HIDDEN for 4.2.0
2424@Deprecated(
2525 message = " This method has been added directly to NodePath" ,
26- replaceWith = ReplaceWith (" this.plus(other)" )
26+ replaceWith = ReplaceWith (" this.plus(other)" ),
2727)
2828operator fun NodePath.plus (other : NodePath ): NodePath {
2929 return NodePath .of(
@@ -33,7 +33,7 @@ operator fun NodePath.plus(other: NodePath): NodePath {
3333 } else {
3434 other[it - size()]
3535 }
36- },
36+ }
3737 )
3838}
3939
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ fun <T : Any> TypeSerializerCollection.get(type: KClass<T>): TypeSerializer<T>?
6565 */
6666fun <A : Annotation > Builder.addProcessor (
6767 definition : KClass <A >,
68- factory : Processor .Factory <A , Any ?>
68+ factory : Processor .Factory <A , Any ?>,
6969): Builder = addProcessor(definition.java, factory)
7070
7171/* *
@@ -105,7 +105,7 @@ inline fun <reified A : Annotation, reified T : Any> Builder.addProcessor(
105105 */
106106fun <A : Annotation > Builder.addConstraint (
107107 definition : KClass <A >,
108- factory : Constraint .Factory <A , Any ?>
108+ factory : Constraint .Factory <A , Any ?>,
109109): Builder = addConstraint(definition.java, factory)
110110
111111/* *
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class BuildersTest {
2828 attributed(
2929 " ServerPack" ,
3030 " version" to " 1.15.2" ,
31- " url" to " https://permissionsex.stellardrift.ca"
31+ " url" to " https://permissionsex.stellardrift.ca" ,
3232 ) {
3333 this .node(" a" ).set(" Hello" )
3434 this .node(" Game, over" ).set(5 )
@@ -69,7 +69,7 @@ private val NO_VALUE: Any = Any()
6969fun <N : ScopedConfigurationNode <N >> N.child (
7070 vararg path : Any ,
7171 value : Any? = NO_VALUE ,
72- init : N .() -> Unit = {}
72+ init : N .() -> Unit = {},
7373) {
7474 val node = this .node(* path)
7575 if (value != NO_VALUE ) {
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ class ObjectMappingTest {
7777 node {
7878 this .node(" name" ).set(" meow" )
7979 this .node(" attributes" ).set(" quiet" ) // does not match regex
80- },
80+ }
8181 )
8282 }
8383 }
@@ -94,7 +94,7 @@ class ObjectMappingTest {
9494 CommentedConfigurationNode .root(
9595 ConfigurationOptions .defaults().implicitInitialization(true ).serializers {
9696 it.registerAnnotatedObjects(objectMapperFactory())
97- },
97+ }
9898 )
9999
100100 val tester = objectMapper<ImplicitTest >().load(node)
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ errorprone="2.27.1"
88indra = " 3.1.3"
99junit =" 5.11.4"
1010ktlint =" 0.49.1"
11- ktfmt =" 0.49 "
11+ ktfmt =" 0.54 "
1212pmd = " 6.55.0"
1313spotless = " 6.25.0"
1414
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ class Tool :
9999
100100 This helps to understand the internal structure of Configurate's nodes
101101 """
102- .trimIndent(),
102+ .trimIndent()
103103 ) {
104104 init {
105105 AnsiConsole .systemInstall()
@@ -174,7 +174,7 @@ sealed class FormatSubcommand<N : ScopedConfigurationNode<N>>(formatName: String
174174 SPLIT ,
175175 attributes
176176 .map { (k, v) -> " @|green \" $k \" |@=@|green \" $v \" |@" }
177- .joinToString(" , " )
177+ .joinToString(" , " ),
178178 )
179179 }
180180 }
You can’t perform that action at this time.
0 commit comments