You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bahir.apache.org by lr...@apache.org on 2017/12/10 16:14:06 UTC
bahir git commit: Enforce License Header in Java Sources
Repository: bahir
Updated Branches:
refs/heads/master f9a67de73 -> 57cb15fd3
Enforce License Header in Java Sources
Add a "Header" rule to the checkstyle configuration
to enforce proper Apache license headers in Java
source files.
A similar rule ("HeaderMatchesChecker") already exists
in the scalastyle configuration.
Closes #58
Project: http://git-wip-us.apache.org/repos/asf/bahir/repo
Commit: http://git-wip-us.apache.org/repos/asf/bahir/commit/57cb15fd
Tree: http://git-wip-us.apache.org/repos/asf/bahir/tree/57cb15fd
Diff: http://git-wip-us.apache.org/repos/asf/bahir/diff/57cb15fd
Branch: refs/heads/master
Commit: 57cb15fd39bd949a5e80a7417ff9c822b8410f2b
Parents: f9a67de
Author: Christian Kadner <ck...@apache.org>
Authored: Sun Dec 10 03:15:04 2017 -0800
Committer: Luciano Resende <lr...@apache.org>
Committed: Sun Dec 10 08:13:32 2017 -0800
----------------------------------------------------------------------
dev/checkstyle-license-header.txt | 16 ++++++++++++++++
dev/checkstyle.xml | 6 ++++++
2 files changed, 22 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bahir/blob/57cb15fd/dev/checkstyle-license-header.txt
----------------------------------------------------------------------
diff --git a/dev/checkstyle-license-header.txt b/dev/checkstyle-license-header.txt
new file mode 100644
index 0000000..c6a5afe
--- /dev/null
+++ b/dev/checkstyle-license-header.txt
@@ -0,0 +1,16 @@
+/*
+ * 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.
+ */
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/bahir/blob/57cb15fd/dev/checkstyle.xml
----------------------------------------------------------------------
diff --git a/dev/checkstyle.xml b/dev/checkstyle.xml
index 3de6aa9..bcebbe9 100644
--- a/dev/checkstyle.xml
+++ b/dev/checkstyle.xml
@@ -52,6 +52,12 @@
<property name="file" value="dev/checkstyle-suppressions.xml"/>
</module>
+ <!-- Checks for license header -->
+ <module name="Header">
+ <property name="headerFile" value="dev/checkstyle-license-header.txt"/>
+ <property name="fileExtensions" value="java"/>
+ </module>
+
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="FileTabCharacter">