Skip to content

Commit d4ecd3d

Browse files
bric3devflow.devflow-routing-intake
andauthored
Bump spotless to 8.4.0 (with tabletest support) (#10866)
chore(build): Bump spotless to 8.3.0 (with tabletest support) chore(build): Bump spotless to 8.4.0 style: Adds tabletest formater step Co-authored-by: devflow.devflow-routing-intake <devflow.devflow-routing-intake@kubernetes.us1.ddbuild.io>
1 parent 3287ced commit d4ecd3d

File tree

10 files changed

+84
-82
lines changed

10 files changed

+84
-82
lines changed

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ plugins {
1111
id("dd-trace-java.config-inversion-linter")
1212
id("dd-trace-java.ci-jobs")
1313

14-
id("com.diffplug.spotless") version "8.2.1"
14+
id("com.diffplug.spotless") version "8.4.0"
1515
id("me.champeau.gradle.japicmp") version "0.4.3"
1616
id("com.github.spotbugs") version "6.4.8"
1717
id("de.thetaphi.forbiddenapis") version "3.10"
@@ -39,6 +39,7 @@ with(extensions["spotlessPredeclare"] as SpotlessExtension) {
3939
removeUnusedImports()
4040

4141
googleJavaFormat("1.34.1")
42+
tableTestFormatter("1.1.1")
4243
}
4344
groovyGradle {
4445
greclipse()

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
`java-gradle-plugin`
33
`kotlin-dsl`
44
`jvm-test-suite`
5-
id("com.diffplug.spotless") version "8.2.1"
5+
id("com.diffplug.spotless") version "8.4.0"
66
}
77

88
// The buildSrc still needs to target Java 8 as build time instrumentation and muzzle plugin

buildSrc/call-site-instrumentation-plugin/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
java
3-
id("com.diffplug.spotless") version "8.2.1"
3+
id("com.diffplug.spotless") version "8.4.0"
44
id("com.gradleup.shadow") version "8.3.9"
55
}
66

components/json/src/test/java/datadog/json/JsonMapperTest.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ void testMappingToMapFromNonObjectJson(String json) {
9494
}
9595

9696
@TableTest({
97-
"Scenario | Input | Expected ",
98-
"null input | | '[]' ",
99-
"empty list | [] | '[]' ",
100-
"single value | [value1] | '[\"value1\"]' ",
101-
"two values | [value1, value2] | '[\"value1\",\"value2\"]' ",
102-
"quoted values | [va\"lu\"e1, value2] | '[\"va\\\"lu\\\"e1\",\"value2\"]' "
97+
"Scenario | Input | Expected ",
98+
"null input | | '[]' ",
99+
"empty list | [] | '[]' ",
100+
"single value | [value1] | '[\"value1\"]' ",
101+
"two values | [value1, value2] | '[\"value1\",\"value2\"]' ",
102+
"quoted values | [va\"lu\"e1, value2] | '[\"va\\\"lu\\\"e1\",\"value2\"]'"
103103
})
104104
@ParameterizedTest(name = "test mapping iterable to JSON array: {0}")
105105
void testMappingIterableToJsonArray(List<String> input, String expected) throws IOException {
@@ -137,14 +137,14 @@ void testMappingToListFromEmptyJsonObject(String json) throws IOException {
137137
}
138138

139139
@TableTest({
140-
"Scenario | input | expected ",
141-
" null value | | '' ",
142-
" empty string | '' | '' ",
143-
" \\b | '\b' | '\"\\b\"' ",
144-
" \\t | '\t' | '\"\\t\"' ",
145-
" \\f | '\f' | '\"\\f\"' ",
146-
" a | 'a' | '\"a\"' ",
147-
" / | '/' | '\"\\/\"' ",
140+
"Scenario | input | expected ",
141+
"null value | | '' ",
142+
"empty string | '' | '' ",
143+
"\\b | '\b' | '\"\\b\"'",
144+
"\\t | '\t' | '\"\\t\"'",
145+
"\\f | '\f' | '\"\\f\"'",
146+
"a | 'a' | '\"a\"' ",
147+
"/ | '/' | '\"\\/\"'"
148148
})
149149
@ParameterizedTest(name = "test mapping to JSON string: {0}")
150150
@MethodSource("testMappingToJsonStringArguments")

dd-trace-api/src/test/java/datadog/trace/api/DDSpanIdTest.java

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
class DDSpanIdTest {
2020

2121
@TableTest({
22-
"scenario | stringId | expectedId ",
23-
"zero | '0' | 0 ",
24-
"one | '1' | 1 ",
25-
"max | '18446744073709551615' | DDSpanId.MAX ",
26-
"long max | '9223372036854775807' | Long.MAX_VALUE ",
27-
"long max plus one | '9223372036854775808' | Long.MIN_VALUE "
22+
"scenario | stringId | expectedId ",
23+
"zero | '0' | 0 ",
24+
"one | '1' | 1 ",
25+
"max | '18446744073709551615' | DDSpanId.MAX ",
26+
"long max | '9223372036854775807' | Long.MAX_VALUE",
27+
"long max plus one | '9223372036854775808' | Long.MIN_VALUE"
2828
})
2929
@ParameterizedTest(name = "convert ids from/to String [{index}]")
3030
void convertIdsFromToString(String stringId, long expectedId) {
@@ -51,15 +51,15 @@ void failOnIllegalString(String stringId) {
5151
}
5252

5353
@TableTest({
54-
"scenario | hexId | expectedId ",
55-
"zero | '0' | 0 ",
56-
"one | '1' | 1 ",
57-
"max | 'ffffffffffffffff' | DDSpanId.MAX ",
58-
"long max | '7fffffffffffffff' | Long.MAX_VALUE ",
59-
"long min | '8000000000000000' | Long.MIN_VALUE ",
60-
"long min with leading zeros | '00008000000000000000' | Long.MIN_VALUE ",
61-
"hex sample | 'cafebabe' | 3405691582 ",
62-
"fifteen hex digits | '123456789abcdef' | 81985529216486895 "
54+
"scenario | hexId | expectedId ",
55+
"zero | '0' | 0 ",
56+
"one | '1' | 1 ",
57+
"max | 'ffffffffffffffff' | DDSpanId.MAX ",
58+
"long max | '7fffffffffffffff' | Long.MAX_VALUE ",
59+
"long min | '8000000000000000' | Long.MIN_VALUE ",
60+
"long min with leading zeros | '00008000000000000000' | Long.MIN_VALUE ",
61+
"hex sample | 'cafebabe' | 3405691582 ",
62+
"fifteen hex digits | '123456789abcdef' | 81985529216486895"
6363
})
6464
@ParameterizedTest(name = "convert ids from/to hex String [{index}]")
6565
void convertIdsFromToHexString(String hexId, long expectedId) {
@@ -77,17 +77,17 @@ void convertIdsFromToHexString(String hexId, long expectedId) {
7777
}
7878

7979
@TableTest({
80-
"scenario | hexId | start | length | lowerCaseOnly | expectedId ",
81-
"null input | | 1 | 1 | false | ",
82-
"empty input | '' | 1 | 1 | false | ",
83-
"negative start | '00' | -1 | 1 | false | ",
84-
"zero length | '00' | 0 | 0 | false | ",
85-
"single zero at index 0 | '00' | 0 | 1 | false | DDSpanId.ZERO",
86-
"single zero at index 1 | '00' | 1 | 1 | false | DDSpanId.ZERO",
87-
"single zero at index 1 duplicate | '00' | 1 | 1 | false | DDSpanId.ZERO",
88-
"max lower-case | 'ffffffffffffffff' | 0 | 16 | true | DDSpanId.MAX ",
89-
"upper-case rejected when lower-case only| 'ffffffffffffFfff' | 0 | 16 | true | ",
90-
"upper-case accepted when lower disabled | 'ffffffffffffFfff' | 0 | 16 | false | DDSpanId.MAX "
80+
"scenario | hexId | start | length | lowerCaseOnly | expectedId ",
81+
"null input | | 1 | 1 | false | ",
82+
"empty input | '' | 1 | 1 | false | ",
83+
"negative start | '00' | -1 | 1 | false | ",
84+
"zero length | '00' | 0 | 0 | false | ",
85+
"single zero at index 0 | '00' | 0 | 1 | false | DDSpanId.ZERO",
86+
"single zero at index 1 | '00' | 1 | 1 | false | DDSpanId.ZERO",
87+
"single zero at index 1 duplicate | '00' | 1 | 1 | false | DDSpanId.ZERO",
88+
"max lower-case | 'ffffffffffffffff' | 0 | 16 | true | DDSpanId.MAX ",
89+
"upper-case rejected when lower-case only | 'ffffffffffffFfff' | 0 | 16 | true | ",
90+
"upper-case accepted when lower disabled | 'ffffffffffffFfff' | 0 | 16 | false | DDSpanId.MAX "
9191
})
9292
@ParameterizedTest(name = "convert ids from part of hex String [{index}]")
9393
void convertIdsFromPartOfHexString(

dd-trace-api/src/test/java/datadog/trace/api/DDTraceIdTest.java

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
class DDTraceIdTest {
1717

1818
@TableTest({
19-
"scenario | longId | expectedString | expectedHex ",
20-
"zero | 0 | '0' | '00000000000000000000000000000000'",
21-
"one | 1 | '1' | '00000000000000000000000000000001'",
22-
"minus one | -1 | '18446744073709551615'| '0000000000000000ffffffffffffffff'",
23-
"long max | Long.MAX_VALUE | '9223372036854775807' | '00000000000000007fffffffffffffff'",
24-
"long min | Long.MIN_VALUE | '9223372036854775808' | '00000000000000008000000000000000'"
19+
"scenario | longId | expectedString | expectedHex ",
20+
"zero | 0 | '0' | '00000000000000000000000000000000'",
21+
"one | 1 | '1' | '00000000000000000000000000000001'",
22+
"minus one | -1 | '18446744073709551615' | '0000000000000000ffffffffffffffff'",
23+
"long max | Long.MAX_VALUE | '9223372036854775807' | '00000000000000007fffffffffffffff'",
24+
"long min | Long.MIN_VALUE | '9223372036854775808' | '00000000000000008000000000000000'"
2525
})
2626
@ParameterizedTest(name = "convert 64-bit ids from/to long and check strings [{index}]")
2727
void convert64BitIdsFromToLongAndCheckStrings(
@@ -39,12 +39,12 @@ void convert64BitIdsFromToLongAndCheckStrings(
3939
}
4040

4141
@TableTest({
42-
"scenario | stringId | expectedId ",
43-
"zero | '0' | DD64bTraceId.ZERO ",
44-
"one | '1' | DD64bTraceId.ONE ",
45-
"max | '18446744073709551615' | DD64bTraceId.MAX ",
46-
"long max | '9223372036854775807' | DD64bTraceId.LONG_MAX",
47-
"long max plus one | '9223372036854775808' | DD64bTraceId.LONG_MIN"
42+
"scenario | stringId | expectedId ",
43+
"zero | '0' | DD64bTraceId.ZERO ",
44+
"one | '1' | DD64bTraceId.ONE ",
45+
"max | '18446744073709551615' | DD64bTraceId.MAX ",
46+
"long max | '9223372036854775807' | DD64bTraceId.LONG_MAX",
47+
"long max plus one | '9223372036854775808' | DD64bTraceId.LONG_MIN"
4848
})
4949
@ParameterizedTest(name = "convert 64-bit ids from/to String representation [{index}]")
5050
void convert64BitIdsFromToStringRepresentation(String stringId, DD64bTraceId expectedId) {
@@ -103,25 +103,25 @@ void failParsingIllegal64BitHexadecimalStringRepresentation(String hexId) {
103103
}
104104

105105
@TableTest({
106-
"scenario | highOrderBits | lowOrderBits | hexId ",
107-
"both long min | Long.MIN_VALUE | Long.MIN_VALUE | '80000000000000008000000000000000'",
108-
"high long min low one | Long.MIN_VALUE | 1 | '80000000000000000000000000000001'",
109-
"high long min low long max | Long.MIN_VALUE | Long.MAX_VALUE | '80000000000000007fffffffffffffff'",
110-
"high one low long min | 1 | Long.MIN_VALUE | '00000000000000018000000000000000'",
111-
"high one low one | 1 | 1 | '00000000000000010000000000000001'",
112-
"high one low long max | 1 | Long.MAX_VALUE | '00000000000000017fffffffffffffff'",
113-
"high long max low long min | Long.MAX_VALUE | Long.MIN_VALUE | '7fffffffffffffff8000000000000000'",
114-
"high long max low one | Long.MAX_VALUE | 1 | '7fffffffffffffff0000000000000001'",
115-
"high long max low long max | Long.MAX_VALUE | Long.MAX_VALUE | '7fffffffffffffff7fffffffffffffff'",
116-
"all zeros length one | 0 | 0 | '0' ",
117-
"all zeros length sixteen | 0 | 0 | '0000000000000000' ",
118-
"all zeros length seventeen | 0 | 0 | '00000000000000000' ",
119-
"all zeros length thirty-two | 0 | 0 | '00000000000000000000000000000000'",
120-
"low fifteen | 0 | 15 | 'f' ",
121-
"low minus one | 0 | -1 | 'ffffffffffffffff' ",
122-
"high fifteen low minus one | 15 | -1 | 'fffffffffffffffff' ",
123-
"all f | -1 | -1 | 'ffffffffffffffffffffffffffffffff'",
124-
"hex literal | 1311768467463790320 | 1311768467463790320 | '123456789abcdef0123456789abcdef0'"
106+
"scenario | highOrderBits | lowOrderBits | hexId ",
107+
"both long min | Long.MIN_VALUE | Long.MIN_VALUE | '80000000000000008000000000000000'",
108+
"high long min low one | Long.MIN_VALUE | 1 | '80000000000000000000000000000001'",
109+
"high long min low long max | Long.MIN_VALUE | Long.MAX_VALUE | '80000000000000007fffffffffffffff'",
110+
"high one low long min | 1 | Long.MIN_VALUE | '00000000000000018000000000000000'",
111+
"high one low one | 1 | 1 | '00000000000000010000000000000001'",
112+
"high one low long max | 1 | Long.MAX_VALUE | '00000000000000017fffffffffffffff'",
113+
"high long max low long min | Long.MAX_VALUE | Long.MIN_VALUE | '7fffffffffffffff8000000000000000'",
114+
"high long max low one | Long.MAX_VALUE | 1 | '7fffffffffffffff0000000000000001'",
115+
"high long max low long max | Long.MAX_VALUE | Long.MAX_VALUE | '7fffffffffffffff7fffffffffffffff'",
116+
"all zeros length one | 0 | 0 | '0' ",
117+
"all zeros length sixteen | 0 | 0 | '0000000000000000' ",
118+
"all zeros length seventeen | 0 | 0 | '00000000000000000' ",
119+
"all zeros length thirty-two | 0 | 0 | '00000000000000000000000000000000'",
120+
"low fifteen | 0 | 15 | 'f' ",
121+
"low minus one | 0 | -1 | 'ffffffffffffffff' ",
122+
"high fifteen low minus one | 15 | -1 | 'fffffffffffffffff' ",
123+
"all f | -1 | -1 | 'ffffffffffffffffffffffffffffffff'",
124+
"hex literal | 1311768467463790320 | 1311768467463790320 | '123456789abcdef0123456789abcdef0'"
125125
})
126126
@ParameterizedTest(
127127
name = "convert 128-bit ids from/to hexadecimal String representation [{index}]")

dd-trace-api/src/test/java/datadog/trace/api/IdGenerationStrategyTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
class IdGenerationStrategyTest {
1919

2020
@TableTest({
21-
"scenario | traceId128BitGenerationEnabled | strategyName ",
22-
"strategies-64-bit | false | {RANDOM, SEQUENTIAL, SECURE_RANDOM}",
23-
"strategies-128-bit | true | {RANDOM, SEQUENTIAL, SECURE_RANDOM}"
21+
"scenario | traceId128BitGenerationEnabled | strategyName ",
22+
"strategies-64-bit | false | {RANDOM, SEQUENTIAL, SECURE_RANDOM}",
23+
"strategies-128-bit | true | {RANDOM, SEQUENTIAL, SECURE_RANDOM}"
2424
})
2525
@ParameterizedTest(name = "generate id with {1} and {0} bits")
2626
void generateIdWithStrategyAndBitSize(

dd-trace-api/src/test/java/datadog/trace/api/internal/util/HexStringUtilsTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
class HexStringUtilsTest {
99

1010
@TableTest({
11-
"scenario | highOrderBits | lowOrderBits | size",
12-
"zero | 0 | 0 | {10, 16, 20, 32, 40}",
13-
"one-two | 1 | 2 | {10, 16, 20, 32, 40}",
14-
"large | 6536977903480360123 | 3270264562721133536 | {10, 16, 20, 32, 40}"
11+
"scenario | highOrderBits | lowOrderBits | size ",
12+
"zero | 0 | 0 | {10, 16, 20, 32, 40}",
13+
"one-two | 1 | 2 | {10, 16, 20, 32, 40}",
14+
"large | 6536977903480360123 | 3270264562721133536 | {10, 16, 20, 32, 40}"
1515
})
1616
@ParameterizedTest(name = "test hexadecimal String representations high={0} low={1} size={2}")
1717
void testHexadecimalStringRepresentations(long highOrderBits, long lowOrderBits, int size) {

gradle/spotless.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ spotless {
2323
// ignore embedded test projects and everything in build dir, e.g. generated sources
2424
targetExclude('src/test/resources/**', buildDirectoryFiles)
2525
googleJavaFormat('1.34.1')
26+
tableTestFormatter('1.1.1')
2627
}
2728
}
2829

test-published-dependencies/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'com.diffplug.spotless' version '8.2.1'
2+
id 'com.diffplug.spotless' version '8.4.0'
33
}
44

55
def sharedConfigDirectory = "$rootDir/../gradle"

0 commit comments

Comments
 (0)