Zero warnings from the analyzer!

Ok, not really zero. Actually 72 if you include warnings from non-sky packages and if you include bogus warnings that can be filtered out.

If you pipe the analyzer's output through the following perl script, though, you get zero warnings on the stock app with this patch:

while (defined($_ = <STDIN>)) {
    s|out/android_Debug/gen/dart-pkg/sky/|sky/sdk/|gos;
    next if m|/dart-pkg/|os; # other packages
    next if m|^\[warning] Missing concrete implementation of 'RenderObject.toString'|os; # https://github.com/dart-lang/sdk/issues/23606
    print;
}

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1182323009.
This commit is contained in:
Hixie 2015-06-18 16:11:29 -07:00
parent 55fbd26e61
commit eb09095bd4
3 changed files with 13 additions and 12 deletions

View File

@ -893,7 +893,7 @@ class RenderTransform extends RenderProxyBox {
void hitTestChildren(HitTestResult result, { Point position }) {
Matrix4 inverse = new Matrix4.zero();
double det = inverse.copyInverse(_transform);
/* double det = */ inverse.copyInverse(_transform);
// TODO(abarth): Check the determinant for degeneracy.
Vector3 position3 = new Vector3(position.x, position.y, 0.0);

View File

@ -65,14 +65,15 @@ class RenderInkWell extends RenderProxyBox {
final List<InkSplash> _splashes = new List<InkSplash>();
void handleEvent(sky.Event event, BoxHitTestEntry entry) {
switch (event.type) {
case 'gesturetapdown':
// TODO(abarth): We should position the splash at the location of the tap.
_startSplash(event.primaryPointer, entry.localPosition);
break;
case 'gesturetap':
_confirmSplash(event.primaryPointer);
break;
if (event is sky.GestureEvent) {
switch (event.type) {
case 'gesturetapdown':
_startSplash(event.primaryPointer, entry.localPosition);
break;
case 'gesturetap':
_confirmSplash(event.primaryPointer);
break;
}
}
}

View File

@ -109,11 +109,11 @@ abstract class Widget {
// Returns the child which should be retained as the child of this node.
Widget syncChild(Widget node, Widget oldNode, dynamic slot) {
assert(oldNode is! Component || !oldNode._disqualifiedFromEverAppearingAgain);
assert(oldNode is! Component || (oldNode is Component && !oldNode._disqualifiedFromEverAppearingAgain)); // TODO(ianh): Simplify this once the analyzer is cleverer
if (node == oldNode) {
assert(node == null || node.mounted);
assert(node is! RenderObjectWrapper || node._ancestor != null);
assert(node is! RenderObjectWrapper || (node is RenderObjectWrapper && node._ancestor != null)); // TODO(ianh): Simplify this once the analyzer is cleverer
return node; // Nothing to do. Subtrees must be identical.
}
@ -495,7 +495,7 @@ abstract class RenderObjectWrapper extends Widget {
void insertChildRoot(RenderObjectWrapper child, dynamic slot);
void detachChildRoot(RenderObjectWrapper child);
void _sync(Widget old, dynamic slot) {
void _sync(RenderObjectWrapper old, dynamic slot) {
// TODO(abarth): We should split RenderObjectWrapper into two pieces so that
// RenderViewObject doesn't need to inherit all this code it
// doesn't need.