analysis_options.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. analyzer:
  2. strong-mode:
  3. implicit-dynamic: false
  4. errors:
  5. # treat missing required parameters as a warning (not a hint)
  6. missing_required_param: warning
  7. # treat missing returns as a warning (not a hint)
  8. missing_return: warning
  9. # allow having TODOs in the code
  10. todo: ignore
  11. exclude:
  12. - '.idea/**'
  13. - 'android/**'
  14. - 'assets/**'
  15. - 'build/**'
  16. - 'ios/**'
  17. - 'res/**'
  18. linter:
  19. rules:
  20. # --- STYLE
  21. # identifiers
  22. - camel_case_types
  23. - library_names
  24. - file_names
  25. - library_prefixes
  26. - non_constant_identifier_names
  27. - constant_identifier_names # prefer
  28. # ordering
  29. - directives_ordering
  30. # formatting
  31. - lines_longer_than_80_chars # avoid
  32. - curly_braces_in_flow_control_structures
  33. # --- DOCUMENTATION
  34. # comments
  35. # doc comments
  36. - slash_for_doc_comments
  37. - package_api_docs # prefer
  38. - comment_references
  39. # markdown
  40. # writing
  41. # --- USAGE
  42. # libraries
  43. - implementation_imports
  44. - avoid_relative_lib_imports
  45. # strings
  46. - prefer_adjacent_string_concatenation
  47. - prefer_interpolation_to_compose_strings # prefer
  48. - unnecessary_brace_in_string_interps # avoid
  49. # collections
  50. - prefer_collection_literals
  51. - avoid_function_literals_in_foreach_calls # avoid
  52. - prefer_iterable_whereType
  53. # functions
  54. - prefer_function_declarations_over_variables
  55. - unnecessary_lambdas
  56. # parameters
  57. - prefer_equal_for_default_values
  58. # variables
  59. - avoid_init_to_null
  60. # members
  61. - unnecessary_getters_setters
  62. - prefer_final_fields
  63. #- prefer_expression_function_bodies # consider
  64. - unnecessary_this
  65. - prefer_typing_uninitialized_variables
  66. # constructors
  67. - prefer_initializing_formals
  68. - type_init_formals
  69. - empty_constructor_bodies
  70. - unnecessary_new
  71. - unnecessary_const
  72. # error handling
  73. - avoid_catches_without_on_clauses # avoid
  74. - use_rethrow_when_possible
  75. # asynchrony
  76. # --- DESIGN
  77. # names
  78. - use_to_and_as_if_applicable
  79. # libraries
  80. # classes
  81. - one_member_abstracts # avoid
  82. - avoid_classes_with_only_static_members # avoid
  83. - public_member_api_docs
  84. # constructors
  85. - prefer_constructors_over_static_methods
  86. # members
  87. - use_setters_to_change_properties
  88. - avoid_setters_without_getters
  89. - avoid_returning_null # avoid
  90. - avoid_returning_this # avoid
  91. # types
  92. - type_annotate_public_apis # prefer
  93. - omit_local_variable_types # avoid
  94. - avoid_types_on_closure_parameters # avoid
  95. - avoid_return_types_on_setters
  96. - prefer_generic_function_type_aliases
  97. - avoid_private_typedef_functions # prefer
  98. # parameters
  99. - avoid_positional_boolean_parameters # avoid
  100. # equality
  101. - hash_and_equals
  102. - avoid_null_checks_in_equality_operators