Repository: incubator-s2graph
Updated Branches:
  refs/heads/S2GRAPH-5 [created] 1d9746180


add apache rat library and sbt task to run rat on project directory.


Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/1d974618
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/1d974618
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/1d974618

Branch: refs/heads/S2GRAPH-5
Commit: 1d9746180bc7eef1bd5928b428ed7052e4a8db60
Parents: ed11106
Author: SteamShon <[email protected]>
Authored: Wed Dec 23 07:40:50 2015 +0900
Committer: SteamShon <[email protected]>
Committed: Wed Dec 23 07:40:50 2015 +0900

----------------------------------------------------------------------
 .rat-excludes           |  22 ++++++++++++++++++++++
 bin/run-rat.sh          |  36 ++++++++++++++++++++++++++++++++++++
 build.sbt               |   7 +++++++
 lib/apache-rat-0.11.jar | Bin 0 -> 1415335 bytes
 4 files changed, 65 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/1d974618/.rat-excludes
----------------------------------------------------------------------
diff --git a/.rat-excludes b/.rat-excludes
new file mode 100644
index 0000000..5e10a72
--- /dev/null
+++ b/.rat-excludes
@@ -0,0 +1,22 @@
+rat.out
+sbt
+sbt.boot.lock
+README*
+.gitignore
+.git
+.svn
+app
+app*
+logs
+s2counter_loader
+spark
+project
+s2ml
+target
+public
+s2rest_netty
+s2rest_play
+test
+test.sh
+loader
+s2counter_core

http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/1d974618/bin/run-rat.sh
----------------------------------------------------------------------
diff --git a/bin/run-rat.sh b/bin/run-rat.sh
new file mode 100644
index 0000000..aff62fb
--- /dev/null
+++ b/bin/run-rat.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+# 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.
+
+base_dir=$(dirname $0)/..
+rat_excludes_file=$base_dir/.rat-excludes
+
+echo "Base Directory = $base_dir"
+
+if [ -z "$JAVA_HOME" ]; then
+  JAVA="java"
+else
+  JAVA="$JAVA_HOME/bin/java"
+fi
+
+rat_command="$JAVA -jar $base_dir/lib/apache-rat-0.11.jar --dir $base_dir "
+
+for f in $(cat $rat_excludes_file);
+do
+  rat_command="${rat_command} -e $f"  
+done
+
+echo "Running " $rat_command
+$rat_command > $base_dir/rat.out

http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/1d974618/build.sbt
----------------------------------------------------------------------
diff --git a/build.sbt b/build.sbt
index bcf92f5..03acb37 100755
--- a/build.sbt
+++ b/build.sbt
@@ -42,3 +42,10 @@ libraryDependencies ++= Seq(
   "com.github.danielwegener" % "logback-kafka-appender" % "0.0.3",
   "org.json4s" %% "json4s-native" % "3.2.11" % Test
 )
+
+
+lazy val runRatTask = taskKey[Unit]("Runs Apache rat on S2Graph")
+
+runRatTask := {
+  "sh bin/run-rat.sh" !
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/1d974618/lib/apache-rat-0.11.jar
----------------------------------------------------------------------
diff --git a/lib/apache-rat-0.11.jar b/lib/apache-rat-0.11.jar
new file mode 100644
index 0000000..1bce767
Binary files /dev/null and b/lib/apache-rat-0.11.jar differ

Reply via email to