You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by so...@apache.org on 2017/04/10 10:21:51 UTC

[52/53] incubator-weex git commit: * [test] update license header chck by danger

* [test] update license header chck by danger


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/39621cc5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/39621cc5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/39621cc5

Branch: refs/heads/0.12-dev
Commit: 39621cc57f8cb336a9d55617b843e4b484a34067
Parents: 255e589
Author: sospartan <so...@apache.org>
Authored: Mon Apr 10 18:20:15 2017 +0800
Committer: sospartan <so...@apache.org>
Committed: Mon Apr 10 18:20:15 2017 +0800

----------------------------------------------------------------------
 dangerfile.js | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/39621cc5/dangerfile.js
----------------------------------------------------------------------
diff --git a/dangerfile.js b/dangerfile.js
index b81e155..e29fd40 100644
--- a/dangerfile.js
+++ b/dangerfile.js
@@ -103,7 +103,9 @@ for (let file of danger.git.modified_files) {
   if (
     file.endsWith(".h") ||
     file.endsWith(".m") ||
-    file.endsWith(".mm")
+    file.endsWith(".mm") ||
+    file.endsWith(".java") ||
+    file.endsWith(".js")
   ) {
     codefiles.push(file);
   }
@@ -113,7 +115,9 @@ if(danger.git.added_files){
     if (
       file.endsWith(".h") ||
       file.endsWith(".m") ||
-      file.endsWith(".mm")
+      file.endsWith(".mm") ||
+      file.endsWith(".java") ||
+      file.endsWith(".js")
     ) {
       codefiles.push(file);
     }
@@ -129,13 +133,18 @@ if (danger.git.lines_of_code > 100 && has_app_changes && !has_test_changes) {
 }
 
 //check ios copyright
+//see scripts/rh/header.template
 const copyright_header_components = [
-  "Created by Weex.",
-  "Copyright \\(c\\) .*, Alibaba, Inc. All rights reserved.",
-  "This source code is licensed under the Apache Licence 2.0.",
-  "For the full copyright and license information,please view the LICENSE file in the root directory of this source tree."
+  "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'
 ];
 
+
 codefiles.forEach(filepath => {
   const content = fs.readFileSync(filepath).toString();
   for (const line of copyright_header_components) {