Skip to content
This repository was archived by the owner on Jan 21, 2025. It is now read-only.

Commit 4a9370e

Browse files
author
Daniel Norberg
authored
Automatic formatting (#34)
* automatic code formatting * foss-root 14
1 parent c7a72ae commit 4a9370e

26 files changed

+472
-464
lines changed

pom.xml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>com.spotify</groupId>
1414
<artifactId>foss-root</artifactId>
15-
<version>13</version>
15+
<version>14</version>
1616
</parent>
1717

1818
<licenses>
@@ -42,6 +42,34 @@
4242
</developer>
4343
</developers>
4444

45+
<profiles>
46+
<profile>
47+
<id>ci</id>
48+
<activation>
49+
<property>
50+
<name>env.CI</name>
51+
<value>true</value>
52+
</property>
53+
</activation>
54+
<build>
55+
<plugins>
56+
<plugin>
57+
<groupId>com.coveo</groupId>
58+
<artifactId>fmt-maven-plugin</artifactId>
59+
<version>2.10</version>
60+
<executions>
61+
<execution>
62+
<goals>
63+
<goal>check</goal>
64+
</goals>
65+
</execution>
66+
</executions>
67+
</plugin>
68+
</plugins>
69+
</build>
70+
</profile>
71+
</profiles>
72+
4573
<dependencies>
4674
<!--compile scope-->
4775
<dependency>
@@ -127,6 +155,18 @@
127155
<plugin>
128156
<artifactId>maven-failsafe-plugin</artifactId>
129157
</plugin>
158+
<plugin>
159+
<groupId>com.coveo</groupId>
160+
<artifactId>fmt-maven-plugin</artifactId>
161+
<version>2.10</version>
162+
<executions>
163+
<execution>
164+
<goals>
165+
<goal>format</goal>
166+
</goals>
167+
</execution>
168+
</executions>
169+
</plugin>
130170
</plugins>
131171
</build>
132172
</project>

src/main/java/com/spotify/logging/JewelCliLoggingConfigurator.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -42,11 +42,15 @@
4242

4343
/**
4444
* Configures logging according to logging related options given at the jewel cli command line. The
45-
* application's command line options should extend JewelCliLoggingOptions and then call: <p>
45+
* application's command line options should extend JewelCliLoggingOptions and then call:
46+
*
47+
* <p>
48+
*
4649
* <pre>
4750
* JewelCliLoggingConfigurator.configure(opts);
4851
* </pre>
49-
* <p> Prior to command line parsing having been completed, the application is suggested to
52+
*
53+
* <p>Prior to command line parsing having been completed, the application is suggested to
5054
* initialize logging as soon as possible using LoggingConfigurator.
5155
*
5256
* @see LoggingConfigurator

src/main/java/com/spotify/logging/JewelCliLoggingOptions.java

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
99
* You may obtain a copy of the License at
10-
*
10+
*
1111
* http://www.apache.org/licenses/LICENSE-2.0
12-
*
12+
*
1313
* Unless required by applicable law or agreed to in writing, software
1414
* distributed under the License is distributed on an "AS IS" BASIS,
1515
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -47,12 +47,16 @@ public interface JewelCliLoggingOptions {
4747
@Option(longName = "syslog", description = "Log to syslog in addition to stderr")
4848
boolean syslog();
4949

50-
@Option(longName = "syslogHost", defaultValue = "",
51-
description = "Log to syslog at specified host in addition to stderr")
50+
@Option(
51+
longName = "syslogHost",
52+
defaultValue = "",
53+
description = "Log to syslog at specified host in addition to stderr")
5254
String syslogHost();
5355

54-
@Option(longName = "syslogPort", defaultValue = "-1",
55-
description = "Log to syslog at specified port in addition to stderr")
56+
@Option(
57+
longName = "syslogPort",
58+
defaultValue = "-1",
59+
description = "Log to syslog at specified port in addition to stderr")
5660
int syslogPort();
5761

5862
@Option(longName = "trace", description = "Set log level to TRACE")
@@ -70,12 +74,15 @@ public interface JewelCliLoggingOptions {
7074
@Option(longName = "error", description = "Set log level to ERROR")
7175
boolean error();
7276

73-
@Option(longName = "ident", description = "Set ident",
74-
defaultValue = LoggingConfigurator.DEFAULT_IDENT)
77+
@Option(
78+
longName = "ident",
79+
description = "Set ident",
80+
defaultValue = LoggingConfigurator.DEFAULT_IDENT)
7581
String ident();
7682

77-
@Option(longName = "logconfig",
78-
description = "Set log configuration according to a logback configuration file",
79-
defaultValue = "")
83+
@Option(
84+
longName = "logconfig",
85+
description = "Set log configuration according to a logback configuration file",
86+
defaultValue = "")
8087
String logFileName();
8188
}

0 commit comments

Comments
 (0)