Skip to content

Instantly share code, notes, and snippets.

@fredgrott
Created March 13, 2024 17:36
Show Gist options
  • Save fredgrott/c96822230346f6b4df7917352701c0f0 to your computer and use it in GitHub Desktop.
Save fredgrott/c96822230346f6b4df7917352701c0f0 to your computer and use it in GitHub Desktop.
dart code linter analysis options snippet
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.
# how to inclued the lint strict lint rule set
include: package:lint/strict.yaml
analyzer:
language:
# lint has only strict-casts marked true but VGV analytics
# has the rest
strict-inference: true
strict-raw-types: true
# errors from VGV analytics minus what lint package has
errors:
close_sinks: ignore
record_literal_one_positional_no_trailing_comma: error
collection_methods_unrelated_type: warning
unrelated_type_equality_checks: warning
exclude:
#- '**.freezed.dart'
#- '**.g.dart'
plugins:
- dart_code_linter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment