Version 3.1.0-323.0.dev
Merge 06be97c607c591f15abfa5a9bfb78d94d3c1c8a5 into dev
diff --git a/pkg/analyzer/doc/implementation/coding_style.md b/pkg/analyzer/doc/implementation/coding_style.md
index 3296648..3df8e8f 100644
--- a/pkg/analyzer/doc/implementation/coding_style.md
+++ b/pkg/analyzer/doc/implementation/coding_style.md
@@ -23,7 +23,7 @@
None.
-### Other style guidelines
+### Formatting and sorting
All of our source code is expected to be
- formatted by the `dart format` command, and
@@ -36,6 +36,25 @@
recommend that you enable both the formatter and the Sort Members command to be
run on save, at least within our packages.
+### Naming conventions
+
+We generally follow the naming conventions from the Dart style guide. We do have
+some legacy code that uses screaming caps for constant names, but newer code
+doesn't use that style for constants.
+
+#### Import prefixes
+
+The Dart style guide doesn't explicitly specify a naming convention for import
+prefixes beyond the guidance to use snake case. (See
+https://dart.dev/effective-dart/style#do-name-import-prefixes-using-lowercase_with_underscores).
+
+However, the examples in the style guide all use the name of the file with the
+`.dart` suffix removed. That's the standard we follow, with the exception that
+we also drop `_test.dart` for test files. That includes using the prefix `path`
+for the path package, even though it's a commonly used variable name. In code
+where there's a conflict, we prefix the variable name with an adjective to form
+a unique name, such as `filePath`.
+
## Styles we're discussing
This section documents the styles we are currently discussing. The purpose
@@ -44,8 +63,8 @@
### Lint rules
-For historic reasons we have enabled some the lint rules in the [core][core] and
-[recommended][recommended] rule sets, but some have been disabled in various
+For historic reasons we have enabled some of the lint rules in the [core][core]
+and [recommended][recommended] rule sets, but some have been disabled in various
packages.
[core]:https://github.com/dart-lang/lints/blob/main/lib/core.yaml
diff --git a/tools/VERSION b/tools/VERSION
index 7d9a5e7..8641b49 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 3
MINOR 1
PATCH 0
-PRERELEASE 322
+PRERELEASE 323
PRERELEASE_PATCH 0