You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hm, good question. On a high level it seems to be a good rule to have, as it is a likely indication of a leftover debug statement, which, even on a server app, could mess up the logs (some app log to stdout, and a separate collector will do the shipping to a centralized server).
On the other hand, one can always use zones to catch all the print calls and turn them into meaningful logging or raise awareness...
Disallowing calls to print would be straight-forward and there's lots of precedent (e.g., https://eslint.org/docs/rules/no-console, pylint's "print-statement", etc).
There's an open request here:dart-lang/sdk#57216. More motivation there welcome!
At least in flutter libraries people shouldn't be printing stuff, example of something that was released:
https://github.com/dooboolab/flutter_calendar_carousel/blob/825df5e8c1e5224972776efc1ed5e0047fa6cf04/lib/flutter_calendar_carousel.dart#L718
Maybe we could come up with a rule for this...?
Note. we should probably still support CLI libraries that needs to print stuff.
The text was updated successfully, but these errors were encountered: