Skip to main content

df_safer_dart_lints 0.7.1 copy "df_safer_dart_lints: ^0.7.1" to clipboard
df_safer_dart_lints: ^0.7.1 copied to clipboard

Analyzer plugin with lints for the df_safer_dart package. Uses annotations from the df_safer_dart_annotations package.

example/lib/example.dart

import 'dart:async';

import 'package:df_safer_dart_annotations/df_safer_dart_annotations.dart';

// A minimal demonstration of df_safer_dart_lints firing.
//
// The function body deliberately uses `Future.value` inside a `@noFutures`
// scope so the lint plugin reports a `no_futures` warning when this file is
// analyzed. The dropped Future is also marked as deliberately discarded with
// `unawaited(...)` so the built-in `discarded_futures` lint is satisfied —
// the diagnostic we want to surface here is the custom `no_futures` one.
@noFutures
void main() {
  // df_safer_dart_lints will warn on this Future inside @noFutures.
  // expect_lint: no_futures
  unawaited(Future<int>.value(1));
}
2
likes
0
points
858
downloads

Publisher

verified publisherdev-cetera.com

Weekly Downloads

Analyzer plugin with lints for the df_safer_dart package. Uses annotations from the df_safer_dart_annotations package.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analysis_server_plugin, analyzer, df_safer_dart_annotations

More

Packages that depend on df_safer_dart_lints