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
c757df3b
Unverified
Commit
c757df3b
authored
Jan 21, 2023
by
Michael Goderbauer
Committed by
GitHub
Jan 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary null checks in dev/bots (#118846)
parent
70cecf6c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
18 deletions
+6
-18
analyze.dart
dev/bots/analyze.dart
+0
-3
analyze_snippet_code.dart
dev/bots/analyze_snippet_code.dart
+1
-1
prepare_package.dart
dev/bots/prepare_package.dart
+1
-3
test.dart
dev/bots/test.dart
+1
-1
unpublish_package.dart
dev/bots/unpublish_package.dart
+3
-10
No files found.
dev/bots/analyze.dart
View file @
c757df3b
...
...
@@ -597,7 +597,6 @@ Future<void> verifyDeprecations(String workingDirectory, { int minimumMatches =
}
String
_generateLicense
(
String
prefix
)
{
assert
(
prefix
!=
null
);
return
'
${prefix}
Copyright 2014 The Flutter Authors. All rights reserved.
\n
'
'
${prefix}
Use of this source code is governed by a BSD-style license that can be
\n
'
'
${prefix}
found in the LICENSE file.'
;
...
...
@@ -1576,8 +1575,6 @@ Future<void> verifyNoBinaries(String workingDirectory, { Set<Hash256>? legacyBin
// UTILITY FUNCTIONS
bool
_listEquals
<
T
>(
List
<
T
>
a
,
List
<
T
>
b
)
{
assert
(
a
!=
null
);
assert
(
b
!=
null
);
if
(
a
.
length
!=
b
.
length
)
{
return
false
;
}
...
...
dev/bots/analyze_snippet_code.dart
View file @
c757df3b
...
...
@@ -924,7 +924,7 @@ class _SnippetChecker {
continue
;
}
final
_SnippetFile
snippet
=
snippets
[
file
.
path
]!
;
final
_SnippetFile
?
snippet
=
snippets
[
file
.
path
]
;
if
(
snippet
==
null
)
{
errors
.
add
(
_SnippetCheckerException
(
"Unknown section for
${file.path}
. Maybe the temporary directory wasn't empty?"
,
...
...
dev/bots/prepare_package.dart
View file @
c757df3b
...
...
@@ -41,9 +41,7 @@ class PreparePackageException implements Exception {
@override
String
toString
()
{
String
output
=
runtimeType
.
toString
();
if
(
message
!=
null
)
{
output
+=
':
$message
'
;
}
output
+=
':
$message
'
;
final
String
stderr
=
result
?.
stderr
as
String
?
??
''
;
if
(
stderr
.
isNotEmpty
)
{
output
+=
':
\n
$stderr
'
;
...
...
dev/bots/test.dart
View file @
c757df3b
...
...
@@ -1018,7 +1018,7 @@ Future<void> _runFrameworkTests() async {
printOutput:
false
,
outputChecker:
(
CommandResult
result
)
{
final
Iterable
<
Match
>
matches
=
httpClientWarning
.
allMatches
(
result
.
flattenedStdout
!);
if
(
matches
==
null
||
matches
.
isEmpty
||
matches
.
length
>
1
)
{
if
(
matches
.
isEmpty
||
matches
.
length
>
1
)
{
return
'Failed to print warning about HttpClientUsage, or printed it too many times.
\n\n
'
'stdout:
\n
${result.flattenedStdout}
\n\n
'
'stderr:
\n
${result.flattenedStderr}
'
;
...
...
dev/bots/unpublish_package.dart
View file @
c757df3b
...
...
@@ -37,9 +37,7 @@ class UnpublishException implements Exception {
@override
String
toString
()
{
String
output
=
runtimeType
.
toString
();
if
(
message
!=
null
)
{
output
+=
':
$message
'
;
}
output
+=
':
$message
'
;
final
String
stderr
=
result
?.
stderr
as
String
?
??
''
;
if
(
stderr
.
isNotEmpty
)
{
output
+=
':
\n
$stderr
'
;
...
...
@@ -113,9 +111,7 @@ class ProcessRunner {
this
.
subprocessOutput
=
true
,
this
.
defaultWorkingDirectory
,
this
.
platform
=
const
LocalPlatform
(),
})
:
assert
(
subprocessOutput
!=
null
),
assert
(
processManager
!=
null
),
assert
(
platform
!=
null
)
{
})
{
environment
=
Map
<
String
,
String
>.
from
(
platform
.
environment
);
}
...
...
@@ -255,9 +251,6 @@ class ArchiveUnpublisher {
continue
;
}
final
Map
<
String
,
String
>
replacementRelease
=
releases
.
firstWhere
((
Map
<
String
,
String
>
value
)
=>
value
[
'channel'
]
==
getChannelName
(
channel
));
if
(
replacementRelease
==
null
)
{
throw
UnpublishException
(
'Unable to find previous release for channel
${getChannelName(channel)}
.'
);
}
(
jsonData
[
'current_release'
]
as
Map
<
String
,
dynamic
>)[
getChannelName
(
channel
)]
=
replacementRelease
[
'hash'
];
print
(
'
${confirmed ? 'Reverting' : 'Would revert'}
current
${getChannelName(channel)}
'
...
...
@@ -468,7 +461,7 @@ Future<void> main(List<String> rawArguments) async {
final
String
tempDirArg
=
parsedArguments
[
'temp_dir'
]
as
String
;
Directory
tempDir
;
bool
removeTempDir
=
false
;
if
(
tempDirArg
==
null
||
tempDirArg
.
isEmpty
)
{
if
(
tempDirArg
.
isEmpty
)
{
tempDir
=
Directory
.
systemTemp
.
createTempSync
(
'flutter_package.'
);
removeTempDir
=
true
;
}
else
{
...
...
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