This commit is contained in:
2025-02-27 18:08:08 +02:00
commit 499020323e
48 changed files with 3036 additions and 0 deletions

47
analysis_options.yaml Normal file
View File

@@ -0,0 +1,47 @@
include: package:lints/recommended.yaml
linter:
rules:
# ==== Project Organization Rules ====
# Enforces relative imports to maintain project structure and avoid unnecessary long paths
- prefer_relative_imports
# Ensures that files are named in lowercase_with_underscores format
- file_names
# ==== Best Practices ====
# Enforces the closing of streams and sinks to avoid memory leaks
- close_sinks
# Avoids empty 'else' blocks to reduce confusion and improve code readability
- avoid_empty_else
# Prefer using 'const' constructors wherever possible for better performance and immutability
- prefer_const_constructors
# Avoid leading underscores for local variable names to prevent conflicts and improve clarity
- no_leading_underscores_for_local_identifiers
# ==== Code Consistency ====
# Avoids the use of 'print' statements in production code, encouraging proper logging instead
- avoid_print
# Encourages using 'final' for fields that are not reassigned to promote immutability
- prefer_final_fields
# Ensures that all types are explicitly specified for better readability and type safety
- always_specify_types
# Avoids redundant default argument values to keep the code clean
- avoid_redundant_argument_values
# Enforces consistency by preferring single quotes over double quotes for string literals
- prefer_single_quotes
# ==== Documentation Rules ====
# Enforces documentation for all public classes, methods, and fields to improve API clarity
# - public_member_api_docs
# ==== Null Safety ====
# Avoids unnecessary null checks and encourages the use of null-aware operators
- unnecessary_null_checks