用途:在 Contentstack Dart SDK 仓库中保持 Dart 代码风格与目录布局一致,适用于在 lib/ 或 test/ 下新增文件、修复 analyzer 或 lint 问题、选择与本仓库一致的 import 风格(package: 与相对路径)。
目录布局:公共 API 位于 lib/contentstack.dart 及 lib/src/;测试位于 test/*.dart,并可有 test/run_test.sh 等可选脚本;分析器配置位于根目录 analysis_options.yaml。
约定(体现在 analysis_options.yaml 中):公共代码优先使用 package: 导入,且启用了 avoid_relative_lib_imports;启用 directives_ordering、package_api_docs(为公共 API 编写文档)、always_declare_return_types,以及严格的空安全实践;生成的 *.g.dart 文件被排除在分析之外,不要手工编辑。
命名:遵循所配置 lint 强制要求的 file_names、camel_case_types、non_constant_identifier_names。
参考:../dev-workflow/SKILL.md(dart analyze / format)、Effective Dart、Analyzer options。
限制:未提供具体命令输出、版本要求或额外示例;其余细节需结合仓库内配置文件与引用资料确认。