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
ab8202dc
Commit
ab8202dc
authored
May 20, 2017
by
Ian Hickson
Committed by
GitHub
May 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track missing dartdocs (#10213)
This will help catch when we accidentally break --dartdocs.
parent
55f0aee9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
3 deletions
+69
-3
dartdocs.dart
dev/devicelab/bin/tasks/dartdocs.dart
+60
-0
manifest.yaml
dev/devicelab/manifest.yaml
+9
-3
No files found.
dev/devicelab/bin/tasks/dartdocs.dart
0 → 100644
View file @
ab8202dc
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:convert'
;
import
'dart:io'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
Future
<
Null
>
main
()
async
{
await
task
(()
async
{
final
Stopwatch
clock
=
new
Stopwatch
()..
start
();
final
Process
analysis
=
await
startProcess
(
'flutter'
,
<
String
>[
'analyze'
,
'--flutter-repo'
,
'--dartdocs'
],
workingDirectory:
flutterDirectory
.
path
,
);
int
publicMembers
=
0
;
int
otherErrors
=
0
;
int
otherLines
=
0
;
await
for
(
String
entry
in
analysis
.
stderr
.
transform
(
UTF8
.
decoder
).
transform
(
const
LineSplitter
()))
{
print
(
'analyzer stderr:
$entry
'
);
if
(
entry
.
startsWith
(
'[lint] Document all public members'
))
{
publicMembers
+=
1
;
}
else
if
(
entry
.
startsWith
(
'['
))
{
otherErrors
+=
1
;
}
else
if
(
entry
.
startsWith
(
'(Ran in '
))
{
// ignore this line
}
else
{
otherLines
+=
1
;
}
}
await
for
(
String
entry
in
analysis
.
stdout
.
transform
(
UTF8
.
decoder
).
transform
(
const
LineSplitter
()))
{
print
(
'analyzer stdout:
$entry
'
);
if
(
entry
==
'Building flutter tool...'
)
{
// ignore this line
}
else
if
(
entry
.
startsWith
(
'Analyzing '
))
{
// ignore this line
}
else
{
otherLines
+=
1
;
}
}
final
int
result
=
await
analysis
.
exitCode
;
clock
.
stop
();
if
(
publicMembers
==
0
&&
otherErrors
==
0
&&
result
!=
0
)
throw
new
Exception
(
'flutter analyze exited with unexpected error code
$result
'
);
if
(
publicMembers
!=
0
&&
otherErrors
!=
0
&&
result
==
0
)
throw
new
Exception
(
'flutter analyze exited with successful status code despite reporting errors'
);
if
(
otherLines
!=
0
)
throw
new
Exception
(
'flutter analyze had unexpected output (we saw
$otherLines
unexpected line
${ otherLines == 1 ? "" : "s" }
)'
);
final
Map
<
String
,
dynamic
>
data
=
<
String
,
dynamic
>{
'members_missing_dartdocs'
:
publicMembers
,
'analysis_errors'
:
otherErrors
,
'elapsed_time_ms'
:
clock
.
elapsedMilliseconds
,
};
return
new
TaskResult
.
success
(
data
,
benchmarkScoreKeys:
data
.
keys
.
toList
());
});
}
dev/devicelab/manifest.yaml
View file @
ab8202dc
...
...
@@ -75,6 +75,12 @@ tasks:
stage
:
devicelab
required_agent_capabilities
:
[
"
has-android-device"
]
dartdocs
:
description
:
>
Tracks how many members are still lacking documentation.
stage
:
devicelab
required_agent_capabilities
:
[
"
has-android-device"
]
# Android on-device tests
complex_layout_scroll_perf__timeline_summary
:
...
...
@@ -190,14 +196,14 @@ tasks:
# Measures the startup time of the Flutter Gallery app on iOS.
# stage: devicelab_ios
# required_agent_capabilities: ["has-ios-device"]
# flaky: true
# flaky: true
# complex_layout_ios__start_up:
# description: >
# Measures the startup time of the Complex Layout sample app on iOS.
# stage: devicelab_ios
# required_agent_capabilities: ["has-ios-device"]
# flaky: true
# flaky: true
flutter_gallery_ios__transition_perf
:
description
:
>
...
...
@@ -225,7 +231,7 @@ tasks:
# Verifies that Flutter View can be used from an iOS project.
# stage: devicelab_ios
# required_agent_capabilities: ["has-ios-device"]
# flaky: true
# flaky: true
integration_ui_ios
:
description
:
>
...
...
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