Skip to content

Commit

Permalink
[CALCITE-2642] Checkstyle complains that maven-wrapper.properties is …
Browse files Browse the repository at this point in the history
…missing a header
  • Loading branch information
julianhyde committed Oct 25, 2018
1 parent 7a07922 commit c5ff670
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 11 deletions.
1 change: 1 addition & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Resources for the Apache Calcite project.
# See wrapper class org.apache.calcite.runtime.CalciteResource.
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
Expand All @@ -16,6 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Resources for the Apache Calcite project.
# See wrapper class org.apache.calcite.runtime.CalciteResource.
#
ParserContext=line {0,number,#}, column {1,number,#}
BangEqualNotAllowed=Bang equal ''!='' is not allowed under the current SQL conformance level
PercentRemainderNotAllowed=Percent remainder ''%'' is not allowed under the current SQL conformance level
Expand Down
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ limitations under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<!-- If you are looking to change source/target,
<!-- If you are looking to change source/target,
change the maven.compiler.{source,target} property -->
<configuration>
<compilerArgument>-Xlint:deprecation</compilerArgument>
Expand All @@ -723,7 +723,6 @@ limitations under the License.
<configLocation>${top.dir}/src/main/config/checkstyle/checker.xml</configLocation>
<suppressionsLocation>${top.dir}/src/main/config/checkstyle/suppressions.xml</suppressionsLocation>
<consoleOutput>true</consoleOutput>
<headerLocation>${top.dir}/src/main/config/checkstyle/header.txt</headerLocation>
<failOnViolation>true</failOnViolation>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
</configuration>
Expand Down
11 changes: 10 additions & 1 deletion src/main/config/checkstyle/checker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,16 @@ limitations under the License.
<!-- See http://checkstyle.sf.net/config_header.html -->
<!-- Verify that EVERY source file has the appropriate license -->
<module name="Header">
<property name="headerFile" value="${checkstyle.header.file}"/>
<property name="headerFile" value="src/main/config/checkstyle/header.java.txt"/>
<property name="fileExtensions" value="cql,java,jj,json,kt"/>
</module>
<module name="Header">
<property name="headerFile" value="src/main/config/checkstyle/header.properties.txt"/>
<property name="fileExtensions" value="properties"/>
</module>
<module name="Header">
<property name="headerFile" value="src/main/config/checkstyle/header.xml.txt"/>
<property name="fileExtensions" value="xml"/>
</module>

<!-- Checks for Javadoc comments (checker). -->
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions src/main/config/checkstyle/header.properties.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
17 changes: 17 additions & 0 deletions src/main/config/checkstyle/header.xml.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
6 changes: 1 addition & 5 deletions src/main/config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,16 @@ limitations under the License.
-->
<suppressions>
<!-- Suppress checks on generated files. -->
<suppress checks="Header" files="CalciteResource.properties"/>
<suppress checks="Header" files="LICENSE"/>
<suppress checks="Header" files="NOTICE"/>
<suppress checks=".*" files="org-apache-calcite-jdbc.properties"/>
<suppress checks=".*" files="Foo.java"/>
<suppress checks=".*" files=".*[/\\]target[/\\]maven-archiver[/\\]pom.properties"/>
<suppress checks=".*" files=".*[/\\]target[/\\]generated-sources[/\\].*"/>
<suppress checks=".*" files=".*[/\\]target[/\\]generated-test-sources[/\\].*"/>
<suppress checks=".*" files=".*[/\\]target[/\\]embeddedCassandra[/\\]log4j-embedded-cassandra.properties"/>
<suppress checks=".*" files="git.properties"/>
<suppress checks=".*" files="trace.properties"/>
<suppress checks=".*" files="release.properties"/>
<suppress checks=".*" files="log4j.*.properties"/>
<suppress checks=".*" files="auth-users.properties"/>
<suppress checks=".*" files="pom.properties"/>

<!-- This file triggers https://github.com/checkstyle/checkstyle/issues/92,
through no fault of its own. -->
Expand Down

0 comments on commit c5ff670

Please sign in to comment.