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/03/31 07:29:20 UTC
[45/50] [abbrv] incubator-weex git commit: * [html5] update
* [html5] update
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/85041f52
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/85041f52
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/85041f52
Branch: refs/heads/0.12-dev
Commit: 85041f52a52e24dc249994f27de6f6ad90c0df85
Parents: 952c266
Author: MrRaindrop <te...@gmail.com>
Authored: Thu Mar 30 15:39:07 2017 +0800
Committer: MrRaindrop <te...@gmail.com>
Committed: Thu Mar 30 15:39:07 2017 +0800
----------------------------------------------------------------------
dangerfile.js | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/85041f52/dangerfile.js
----------------------------------------------------------------------
diff --git a/dangerfile.js b/dangerfile.js
index 8bf99ee..b62c110 100644
--- a/dangerfile.js
+++ b/dangerfile.js
@@ -27,11 +27,15 @@ const flowIgnorePaths = [
// new js files should have `@flow` at the top
const unFlowedFiles = jsFiles.filter(filepath => {
- for (const p in flowIgnorePaths) {
- if (p.indexOf(filepath) >= -1) {
+ let i = 0
+ const len = flowIgnorePaths.length
+ while (i < len) {
+ const p = flowIgnorePaths[i]
+ if (p.indexOf(filepath) > -1) {
// ignore this file because it's in the flow-ignore-paths.
- return;
+ return false;
}
+ i++
}
const content = fs.readFileSync(filepath);
return !content.includes("@flow");