* [test] check cn source
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/cbfb1a96 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/cbfb1a96 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/cbfb1a96 Branch: refs/heads/release Commit: cbfb1a96297e84bf064029c887f9325d55c2f85f Parents: d6a9c1f Author: gurisxie <279483...@qq.com> Authored: Mon Oct 16 15:02:26 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Mon Oct 16 15:04:38 2017 +0800 ---------------------------------------------------------------------- dangerfile.js | 8 ++++++++ 1 file changed, 8 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/cbfb1a96/dangerfile.js ---------------------------------------------------------------------- diff --git a/dangerfile.js b/dangerfile.js index 97c4146..bfa61fb 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -273,6 +273,14 @@ filesToVerifySrcHeader.forEach(filepath => { return; } } + + // check cn for source code + var reg = /[\u4e00-\u9FA5]+/; + var res = reg.test(content); + if(res){ + fail("Code file "+ filepath +" has cn source code."); + return ; + } });