analysis_options.yaml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # This file configures the analyzer, which statically analyzes Dart code to
  2. # check for errors, warnings, and lints.
  3. #
  4. # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
  5. # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
  6. # invoked from the command line by running `flutter analyze`.
  7. # The following line activates a set of recommended lints for Flutter apps,
  8. # packages, and plugins designed to encourage good coding practices.
  9. include: package:flutter_lints/flutter.yaml
  10. analyzer:
  11. exclude:
  12. - build/**
  13. - android/**
  14. errors:
  15. # lib/tools/ 和 lib/utils/ 是从 mathtool2 整包搬过来的(16 个工具 + 两个
  16. # 数学工具类),按另一套风格写的,搬迁时不重写。下面这些全是纯风格问题,
  17. # 先压掉噪音;等真要动这些文件时再逐个清理。
  18. # 注意 deprecated_member_use 也一并压了 —— math_expressions 把 Parser/evaluate
  19. # 标了废弃,但替换 API 需要改写工具的求值逻辑,不属于本次搬迁范围。
  20. deprecated_member_use: ignore
  21. use_key_in_widget_constructors: ignore
  22. library_private_types_in_public_api: ignore
  23. sized_box_for_whitespace: ignore
  24. non_constant_identifier_names: ignore
  25. prefer_final_fields: ignore
  26. unnecessary_this: ignore
  27. sort_child_properties_last: ignore
  28. unnecessary_to_list_in_spreads: ignore
  29. unnecessary_brace_in_string_interps: ignore
  30. prefer_is_empty: ignore
  31. prefer_interpolation_to_compose_strings: ignore
  32. linter:
  33. # The lint rules applied to this project can be customized in the
  34. # section below to disable rules from the `package:flutter_lints/flutter.yaml`
  35. # included above or to enable additional rules. A list of all available lints
  36. # and their documentation is published at https://dart.dev/lints.
  37. #
  38. # Instead of disabling a lint rule for the entire project in the
  39. # section below, it can also be suppressed for a single line of code
  40. # or a specific dart file by using the `// ignore: name_of_lint` and
  41. # `// ignore_for_file: name_of_lint` syntax on the line or in the file
  42. # producing the lint.
  43. rules:
  44. # avoid_print: false # Uncomment to disable the `avoid_print` rule
  45. # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
  46. # Additional information about this file can be found at
  47. # https://dart.dev/guides/language/analysis-options