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

Lints for the df_safer_dart package. Uses annotations from the df_safer_dart_annotation 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
60
points
303
downloads

Documentation

API reference

Publisher

verified publisherdev-cetera.com

Weekly Downloads

Lints for the df_safer_dart package. Uses annotations from the df_safer_dart_annotation package.

Homepage
Repository (GitHub)
View/report issues

Funding

Consider supporting this project:

www.buymeacoffee.com
www.patreon.com
github.com

License

MIT (license)

Dependencies

analyzer, custom_lint_builder, df_safer_dart_annotations

More

Packages that depend on df_safer_dart_lints