Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
d90ee212
Unverified
Commit
d90ee212
authored
Jun 08, 2021
by
Anis Alibegić
Committed by
GitHub
Jun 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate dartdoc to null safety (#84153)
parent
e6aa6ce2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
dartdoc.dart
dev/tools/dartdoc.dart
+3
-5
dartdoc_checker.dart
dev/tools/dartdoc_checker.dart
+1
-3
No files found.
dev/tools/dartdoc.dart
View file @
d90ee212
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'dart:convert'
;
import
'dart:io'
;
...
...
@@ -258,9 +256,9 @@ String getBranchName() {
final
ProcessResult
gitResult
=
Process
.
runSync
(
'git'
,
<
String
>[
'status'
,
'-b'
,
'--porcelain'
]);
if
(
gitResult
.
exitCode
!=
0
)
throw
'git status exit with non-zero exit code:
${gitResult.exitCode}
'
;
final
Match
gitBranchMatch
=
gitBranchRegexp
.
firstMatch
(
final
RegExpMatch
?
gitBranchMatch
=
gitBranchRegexp
.
firstMatch
(
(
gitResult
.
stdout
as
String
).
trim
().
split
(
'
\n
'
).
first
);
return
gitBranchMatch
==
null
?
''
:
gitBranchMatch
.
group
(
1
).
split
(
'...'
).
first
;
return
gitBranchMatch
==
null
?
''
:
gitBranchMatch
.
group
(
1
)
!
.
split
(
'...'
).
first
;
}
String
gitRevision
(
)
{
...
...
@@ -314,7 +312,7 @@ void createSearchMetadata(String templatePath, String metadataPath) {
/// specified, for each source/destination file pair.
///
/// Creates `destDir` if needed.
void
copyDirectorySync
(
Directory
srcDir
,
Directory
destDir
,
[
void
Function
(
File
srcFile
,
File
destFile
)
onFileCopied
])
{
void
copyDirectorySync
(
Directory
srcDir
,
Directory
destDir
,
[
void
Function
(
File
srcFile
,
File
destFile
)
?
onFileCopied
])
{
if
(!
srcDir
.
existsSync
())
throw
Exception
(
'Source directory "
${srcDir.path}
" does not exist, nothing to copy'
);
...
...
dev/tools/dartdoc_checker.dart
View file @
d90ee212
...
...
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @dart = 2.8
import
'dart:io'
;
import
'package:path/path.dart'
as
path
;
...
...
@@ -82,7 +80,7 @@ void checkForUnresolvedDirectives(String htmlOutputPath) {
int
_scanFile
(
File
file
)
{
assert
(
path
.
extension
(
file
.
path
)
==
'.html'
);
final
Iterable
<
String
>
matches
=
_pattern
.
allMatches
(
file
.
readAsStringSync
())
.
map
((
RegExpMatch
m
)
=>
m
.
group
(
0
));
.
map
((
RegExpMatch
m
)
=>
m
.
group
(
0
)
!
);
if
(
matches
.
isNotEmpty
)
{
stderr
.
writeln
(
'Found unresolved dartdoc directives in
${file.path}
:'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment