Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Side by Side Diff: test/rules/prefer_is_not_empty.dart

Issue 1419373009: Lint to prefer x.isNotEmpty vs. !x.isEmpty (#143). (Closed) Base URL: https://github.com/dart-lang/linter.git@master
Patch Set: doc fix. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/sdk.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library lib1; 5 bool lne = ![].isEmpty; //LINT [12:11]
6 bool mne = !{}.isEmpty; //LINT
7 bool ine = !iterable.isEmpty; //LINT
6 8
7 import 'package:p4/lib2.dart'; 9 bool le = [].isEmpty;
10 bool me = {}.isEmpty;
11 bool ie = iterable.isEmpty;
8 12
9 import 'lib3.dart'; 13 Iterable get iterable => [];
10
11 void test() {
12 f(g());
13 }
OLDNEW
« no previous file with comments | « lib/src/sdk.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698