Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
b8e0c926
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
b8e0c926
编写于
7月 13, 2018
作者:
M
Michael Goderbauer
提交者:
GitHub
7月 13, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update license script to run with newer Dart versions (#5748)
上级
9af920ef
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
13 deletion
+21
-13
tools/licenses/lib/licenses.dart
tools/licenses/lib/licenses.dart
+6
-6
tools/licenses/lib/main.dart
tools/licenses/lib/main.dart
+1
-1
tools/licenses/pubspec.lock
tools/licenses/pubspec.lock
+14
-6
未找到文件。
tools/licenses/lib/licenses.dart
浏览文件 @
b8e0c926
...
...
@@ -114,7 +114,7 @@ abstract class License implements Comparable<License> {
if
(
result
is
!
UniqueLicense
||
result
.
type
!=
type
)
throw
'tried to add a UniqueLicense
$type
, but it was a duplicate of a
${result.runtimeType}
${result.type}
'
;
return
true
;
});
}
()
);
return
result
;
}
...
...
@@ -126,7 +126,7 @@ abstract class License implements Comparable<License> {
if
(
result
is
!
TemplateLicense
||
result
.
type
!=
type
)
throw
'tried to add a TemplateLicense
$type
, but it was a duplicate of a
${result.runtimeType}
${result.type}
'
;
return
true
;
});
}
()
);
return
result
;
}
...
...
@@ -138,7 +138,7 @@ abstract class License implements Comparable<License> {
if
(
result
is
!
MessageLicense
||
result
.
type
!=
type
)
throw
'tried to add a MessageLicense
$type
, but it was a duplicate of a
${result.runtimeType}
${result.type}
'
;
return
true
;
});
}
()
);
return
result
;
}
...
...
@@ -148,7 +148,7 @@ abstract class License implements Comparable<License> {
if
(
result
is
!
BlankLicense
||
result
.
type
!=
type
)
throw
'tried to add a BlankLicense
$type
, but it was a duplicate of a
${result.runtimeType}
${result.type}
'
;
return
true
;
});
}
()
);
return
result
;
}
...
...
@@ -310,7 +310,7 @@ abstract class License implements Comparable<License> {
throw
'incorrectly created a
$runtimeType
for a
$type
'
;
}
return
true
;
});
}
()
);
final
LicenseType
detectedType
=
convertBodyToType
(
body
);
if
(
detectedType
!=
LicenseType
.
unknown
&&
detectedType
!=
type
&&
!
yesWeKnowWhatItLooksLikeButItIsNot
)
throw
'Created a license of type
$type
but it looks like
$detectedType
\
.'
;
...
...
@@ -789,7 +789,7 @@ Iterable<_LicenseMatch> _tryReferenceByType(String body, RegExp pattern, License
String
copyrights
=
_reformat
(
match
.
getCopyrights
());
assert
(
needsCopyright
&&
copyrights
.
isNotEmpty
||
!
needsCopyright
&&
copyrights
.
isEmpty
);
return
true
;
});
}
()
);
if
(
needsCopyright
)
yield
*
_expand
(
template
,
match
.
getCopyrights
(),
match
.
getEntireLicense
(),
match
.
start
,
match
.
end
,
debug:
'_tryReferenceByType'
,
origin:
origin
);
else
...
...
tools/licenses/lib/main.dart
浏览文件 @
b8e0c926
...
...
@@ -956,7 +956,7 @@ class RepositoryDirectory extends RepositoryEntry implements LicenseSource {
}
}
int
get
count
=>
_files
.
length
+
_subdirectories
.
fold
(
0
,
(
int
count
,
RepositoryDirectory
child
)
=>
count
+
child
.
count
);
int
get
count
=>
_files
.
length
+
_subdirectories
.
fold
<
int
>
(
0
,
(
int
count
,
RepositoryDirectory
child
)
=>
count
+
child
.
count
);
@override
List
<
License
>
nearestLicensesFor
(
String
name
)
{
...
...
tools/licenses/pubspec.lock
浏览文件 @
b8e0c926
# Generated by pub
# See http
://pub.dartlang.org/doc/glossary.html
#lockfile
# See http
s://www.dartlang.org/tools/pub/glossary
#lockfile
packages:
archive:
dependency: "direct main"
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.33"
args:
dependency: "direct main"
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "0.13.7"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.
1
"
version: "1.1.
2
"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.
5
"
version: "1.14.
10
"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
crypto:
dependency: "direct main"
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.
2+1
"
version: "2.0.
6
"
path:
dependency: "direct main"
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.
5
.1"
version: "1.
6
.1"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.5"
sdks:
dart: ">=
1.21.0 <2.0.0
"
dart: ">=
2.0.0-dev.62.0 <=2.0.0-dev.67.0.flutter-84ca27a09e
"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录