Ai
1 Star 0 Fork 0

coderxslee/flutter_hplus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
analysis_options.yaml 3.49 KB
一键复制 编辑 原始数据 按行查看 历史
coderxslee 提交于 2025-03-13 21:15 +08:00 . no message
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
# rules:
# # 避免空块
# avoid_empty_else: true
# # 避免打印
# avoid_print: true
# # 避免使用相对导入
# avoid_relative_lib_imports: true
# # 避免返回null
# avoid_returning_null_for_future: true
# # 避免类型检查
# avoid_type_to_string: true
# # 避免不必要的容器
# avoid_unnecessary_containers: true
# # 避免web库中的私有类型
# avoid_web_libraries_in_flutter: true
# # 使用空条件而不是条件表达式
# prefer_if_null_operators: true
# # 使用isEmpty而不是length检查
# prefer_is_empty: true
# # 使用isNotEmpty而不是!isEmpty
# prefer_is_not_empty: true
# # 排序构造函数先按必需参数,后按可选参数
# sort_constructors_first: true
# # 排序未命名的构造函数在命名构造函数之前
# sort_unnamed_constructors_first: true
# # 确保throw表达式是语句
# throw_in_finally: true
# # 类型注解用于公共API
# type_annotate_public_apis: true
# # 不必要的花括号
# unnecessary_brace_in_string_interps: true
# # 不必要的常量
# unnecessary_const: true
# # 不必要的getter
# unnecessary_getters_setters: true
# # 不必要的new关键字
# unnecessary_new: true
# # 不必要的null检查
# unnecessary_null_checks: true
# # 不必要的可空操作符
# unnecessary_nullable_for_final_variable_declarations: true
# # 不必要的statements
# unnecessary_statements: true
# # 不必要的this
# unnecessary_this: true
# # 不安全的html
# unsafe_html: true
# analyzer:
# language:
# strict-casts: true
# strict-inference: true
# strict-raw-types: true
# errors:
# # 将一些lint视为errors而不是warnings
# unused_field: warning
# unused_element: warning
# exclude:
# - lib/generated_plugin_registrant.dart
# - lib/generated/**
# - '**.g.dart'
# # 增加行长度限制
# strong-mode:
# implicit-casts: false
# implicit-dynamic: false
# # 设置行长度
# dart_style:
# line_length: 120
# # 保留格式化
# preserve_formatting: true
# # 单行初始化器
# one_line_initializers: true
# # 函数调用格式保留
# functions_preserving_newlines: true
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Dart
1
https://gitee.com/coderxslee/flutter_hplus.git
git@gitee.com:coderxslee/flutter_hplus.git
coderxslee
flutter_hplus
flutter_hplus
master

搜索帮助