Skip to content

Commit 285bdb1

Browse files
authored
fix: re-enable checkstyle in sdk-platform-java-config (#2335)
The checkstyle was initially disabled to address the following error when executing `mvn clean install`: ``` [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.3.1:check (checkstyle) on project sdk-platform-java-config: Failed during checkstyle execution: Unable to find configuration file at location: license-checks.xml: Could not find resource 'license-checks.xml'. -> [Help 1] ``` However, since this artifact is meant to be used as a parent for downstream libraries, there is a risk that the `checkstyle.skip` property will be inherited by child poms in the future. This may cause checkstyle to be unintentionally disabled.
1 parent dcaffd7 commit 285bdb1

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

sdk-platform-java-config/java.header

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
^/\*$
2+
^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)$
3+
^ \*$
4+
^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$
5+
^ \* you may not use this file except in compliance with the License\.$
6+
^ \* You may obtain a copy of the License at$
7+
^ \*$
8+
^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$
9+
^ \*$
10+
^ \* Unless required by applicable law or agreed to in writing, software$
11+
^ \* distributed under the License is distributed on an "AS IS" BASIS,$
12+
^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$
13+
^ \* See the License for the specific language governing permissions and$
14+
^ \* limitations under the License\.$
15+
^ \*/$
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC
3+
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4+
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
5+
<module name="Checker">
6+
<module name="RegexpHeader">
7+
<property name="fileExtensions" value="java"/>
8+
<property name="headerFile" value="${checkstyle.header.file}"/>
9+
</module>
10+
</module>

sdk-platform-java-config/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
</parent>
1818

1919
<properties>
20-
<checkstyle.skip>true</checkstyle.skip>
2120
<google-cloud-shared-dependencies.version>3.20.1-SNAPSHOT</google-cloud-shared-dependencies.version> <!-- {x-version-update:google-cloud-shared-dependencies:current} -->
2221
</properties>
2322
</project>

0 commit comments

Comments
 (0)