Skip to content

Commit 68f3e27

Browse files
committed
Partially format api/.../symbols
Related to #2990
1 parent 7fa773a commit 68f3e27

7 files changed

Lines changed: 59 additions & 33 deletions

File tree

api/src/main/kotlin/com/google/devtools/ksp/symbol/ClassKind.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
package com.google.devtools.ksp.symbol
1818

1919
/**
20-
* Kind of a class declaration.
21-
* Interface, class, enum class and object are all considered a class declaration.
20+
* Kind of a class declaration. Interface, class, enum class and object are all considered a class
21+
* declaration.
2222
*/
2323
enum class ClassKind(val type: String) {
2424
INTERFACE("interface"),
2525
CLASS("class"),
2626
ENUM_CLASS("enum_class"),
2727
ENUM_ENTRY("enum_entry"),
2828
OBJECT("object"),
29-
ANNOTATION_CLASS("annotation_class")
29+
ANNOTATION_CLASS("annotation_class"),
3030
}

api/src/main/kotlin/com/google/devtools/ksp/symbol/FunctionKind.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
*/
1717
package com.google.devtools.ksp.symbol
1818

19-
/**
20-
* Kind of a function declaration.
21-
*/
19+
/** Kind of a function declaration. */
2220
enum class FunctionKind {
23-
TOP_LEVEL, MEMBER, STATIC, ANONYMOUS, LAMBDA;
21+
TOP_LEVEL,
22+
MEMBER,
23+
STATIC,
24+
ANONYMOUS,
25+
LAMBDA,
2426
}

api/src/main/kotlin/com/google/devtools/ksp/symbol/Modifier.kt

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,50 @@
1717
package com.google.devtools.ksp.symbol
1818

1919
/**
20-
* All possible modifiers presented in the Kotlin grammar.
21-
* Modifiers you can get from a declaration are explict modifiers as they are declared in source code.
22-
* Same modifier can be semantically different in different languages, therefore you should only rely on modifiers if you have a good
23-
* understanding of what it means in specific cases, otherwise you should rely on helper functions like isOpen() for modifier related logic.
24-
* Modifiers prefixed with "JAVA_" are java only modifiers.
20+
* All possible modifiers presented in the Kotlin grammar. Modifiers you can get from a declaration
21+
* are explict modifiers as they are declared in source code. Same modifier can be semantically
22+
* different in different languages, therefore you should only rely on modifiers if you have a good
23+
* understanding of what it means in specific cases, otherwise you should rely on helper functions
24+
* like isOpen() for modifier related logic. Modifiers prefixed with "JAVA_" are java only
25+
* modifiers.
2526
*/
2627
enum class Modifier {
27-
PUBLIC, PRIVATE, INTERNAL, PROTECTED,
28-
IN, OUT,
29-
OVERRIDE, LATEINIT,
30-
ENUM, SEALED, ANNOTATION, DATA, INNER, FUN, VALUE,
31-
SUSPEND, TAILREC, OPERATOR, INFIX, INLINE, EXTERNAL,
32-
ABSTRACT, FINAL, OPEN, CONST,
33-
VARARG, NOINLINE, CROSSINLINE,
28+
PUBLIC,
29+
PRIVATE,
30+
INTERNAL,
31+
PROTECTED,
32+
IN,
33+
OUT,
34+
OVERRIDE,
35+
LATEINIT,
36+
ENUM,
37+
SEALED,
38+
ANNOTATION,
39+
DATA,
40+
INNER,
41+
FUN,
42+
VALUE,
43+
SUSPEND,
44+
TAILREC,
45+
OPERATOR,
46+
INFIX,
47+
INLINE,
48+
EXTERNAL,
49+
ABSTRACT,
50+
FINAL,
51+
OPEN,
52+
CONST,
53+
VARARG,
54+
NOINLINE,
55+
CROSSINLINE,
3456
REIFIED,
35-
EXPECT, ACTUAL,
36-
JAVA_DEFAULT, JAVA_NATIVE, JAVA_STATIC, JAVA_STRICT, JAVA_SYNCHRONIZED, JAVA_TRANSIENT, JAVA_VOLATILE
57+
EXPECT,
58+
ACTUAL,
59+
JAVA_DEFAULT,
60+
JAVA_NATIVE,
61+
JAVA_STATIC,
62+
JAVA_STRICT,
63+
JAVA_SYNCHRONIZED,
64+
JAVA_TRANSIENT,
65+
JAVA_VOLATILE,
3766
}

api/src/main/kotlin/com/google/devtools/ksp/symbol/Nullability.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,9 @@
1616
*/
1717
package com.google.devtools.ksp.symbol
1818

19-
/**
20-
* Nullability of types
21-
* PLATFORM types can be nullable or not nullable, depending on context.
22-
*/
19+
/** Nullability of types PLATFORM types can be nullable or not nullable, depending on context. */
2320
enum class Nullability {
2421
NULLABLE,
2522
NOT_NULL,
26-
PLATFORM
23+
PLATFORM,
2724
}

api/src/main/kotlin/com/google/devtools/ksp/symbol/Origin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ enum class Origin {
2121
KOTLIN_LIB,
2222
JAVA,
2323
JAVA_LIB,
24-
SYNTHETIC
24+
SYNTHETIC,
2525
}

api/src/main/kotlin/com/google/devtools/ksp/symbol/Variance.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
package com.google.devtools.ksp.symbol
1818

1919
/**
20-
* Represents both declaration-site and use-site variance.
21-
* STAR is only used and valid in use-site variance, while others can be used in both.
20+
* Represents both declaration-site and use-site variance. STAR is only used and valid in use-site
21+
* variance, while others can be used in both.
2222
*/
2323
enum class Variance(val label: String) {
2424
STAR("*"),
2525
INVARIANT(""),
2626
COVARIANT("out"),
27-
CONTRAVARIANT("in");
27+
CONTRAVARIANT("in"),
2828
}

api/src/main/kotlin/com/google/devtools/ksp/symbol/Visibility.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
*/
1717
package com.google.devtools.ksp.symbol
1818

19-
/**
20-
* Visibility of the element
21-
*/
19+
/** Visibility of the element */
2220
enum class Visibility {
2321
PUBLIC,
2422
PRIVATE,

0 commit comments

Comments
 (0)