dart-lang / linter

Linter for Dart.
https://dart.dev/tools/linter-rules
BSD 3-Clause "New" or "Revised" License
630 stars 170 forks source link

Add a hint when a double is printed #2136

Open sethladd opened 10 years ago

sethladd commented 10 years ago

dart2js and vm differ when printing doubles.

  double x = 5.0;   print("x is $x") ;

vm : 5.0 dart2js : 5

Until Issue dart-lang/sdk#15881 is address, can we give the developer a hint or warning that printing a double results in differing behavior. Giving developers early warnings when code runs differently really helps to shorten the bug cycle.

bwilkerson commented 10 years ago

The issue to watch is now Issue dart-lang/sdk#1533.


Added this to the 1.2 milestone.

clayberg commented 10 years ago

Removed Priority-Unassigned label. Added Priority-Medium label.

clayberg commented 10 years ago

Removed this from the 1.2 milestone. Added this to the 1.3 milestone.

jwren commented 10 years ago

This would be a hint. Currently with other bugs and our current resources all hint work is being marked as Later.


Removed this from the 1.3 milestone. Added this to the Later milestone. Changed the title to: "[Hint] Add a hint when a double is printed".

clayberg commented 10 years ago

Added Analyzer-Hint label.

bwilkerson commented 10 years ago

Changed the title to: "Add a hint when a double is printed".

kasperl commented 10 years ago

Removed this from the Later milestone. Added Oldschool-Milestone-Later label.

sethladd commented 10 years ago

Removed Oldschool-Milestone-Later label.

srawlins commented 4 years ago

Since there are certainly false-positives here, I think this is better suited for the linter.