Commit 3a31c35b authored by Dan Rubel's avatar Dan Rubel Committed by GitHub

Rename .analysis_options to analysis_options.yaml (#11594)

parent 225da923
...@@ -76,11 +76,11 @@ main ways to run it. In either case you will want to run `flutter update-package ...@@ -76,11 +76,11 @@ main ways to run it. In either case you will want to run `flutter update-package
first, or you will get version conflict issues or bogus error messages about core clases like first, or you will get version conflict issues or bogus error messages about core clases like
Offset from `dart:ui`. Offset from `dart:ui`.
For a one-off, use `flutter analyze --flutter-repo`. This uses the `.analysis_options_repo` file For a one-off, use `flutter analyze --flutter-repo`. This uses the `analysis_options_repo.yaml` file
at the root of the repository for its configuration. at the root of the repository for its configuration.
For continuous analysis, use `flutter analyze --flutter-repo --watch`. This uses normal For continuous analysis, use `flutter analyze --flutter-repo --watch`. This uses normal
`.analysis_options` files, and they can differ from package to package. `analysis_options.yaml` files, and they can differ from package to package.
If you want to see how many members are missing dartdocs, you should use the first option, If you want to see how many members are missing dartdocs, you should use the first option,
providing the additional command `--dartdocs`. providing the additional command `--dartdocs`.
......
...@@ -8,13 +8,13 @@ ...@@ -8,13 +8,13 @@
# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer # https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer
# #
# There are four similar analysis options files in the flutter repos: # There are four similar analysis options files in the flutter repos:
# - .analysis_options (this file) # - analysis_options.yaml (this file)
# - .analysis_options_repo # - analysis_options_repo.yaml
# - packages/flutter/lib/analysis_options_user.yaml # - packages/flutter/lib/analysis_options_user.yaml
# - https://github.com/flutter/plugins/blob/master/.analysis_options # - https://github.com/flutter/plugins/blob/master/analysis_options.yaml
# #
# This file contains the analysis options used by Flutter editors, such as Atom. # This file contains the analysis options used by Flutter editors, such as Atom.
# It is very similar to the .analysis_options_repo file in this same directory; # It is very similar to the analysis_options_repo.yaml file in this same directory;
# the only difference (currently) is the public_member_api_docs option, # the only difference (currently) is the public_member_api_docs option,
# which triggers too many messages to be used in editors. # which triggers too many messages to be used in editors.
# #
...@@ -122,7 +122,7 @@ linter: ...@@ -122,7 +122,7 @@ linter:
# - prefer_interpolation_to_compose_strings # not yet tested # - prefer_interpolation_to_compose_strings # not yet tested
- prefer_is_empty - prefer_is_empty
- prefer_is_not_empty - prefer_is_not_empty
# - public_member_api_docs # this is the only difference from .analysis_options_repo # - public_member_api_docs # this is the only difference from analysis_options_repo.yaml
# - recursive_getters # https://github.com/dart-lang/linter/issues/452 # - recursive_getters # https://github.com/dart-lang/linter/issues/452
- slash_for_doc_comments - slash_for_doc_comments
- sort_constructors_first - sort_constructors_first
......
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer # https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer
# #
# There are three similar analysis options files in the flutter repo: # There are three similar analysis options files in the flutter repo:
# - .analysis_options # - analysis_options.yaml
# - .analysis_options_repo (this file) # - analysis_options_repo.yaml (this file)
# - packages/flutter/lib/analysis_options_user.yaml # - packages/flutter/lib/analysis_options_user.yaml
# #
# This file contains the analysis options used by 'flutter analyze' when analyzing # This file contains the analysis options used by 'flutter analyze' when analyzing
# the flutter repository. It is very similar to .analysis_options; # the flutter repository. It is very similar to analysis_options.yaml;
# the only difference (currently) is the public_member_api_docs option, # the only difference (currently) is the public_member_api_docs option,
# which is turned on and programmatically reduced to a single output line # which is turned on and programmatically reduced to a single output line
# indicating the # of violations for that rule. # indicating the # of violations for that rule.
...@@ -116,7 +116,7 @@ linter: ...@@ -116,7 +116,7 @@ linter:
# - prefer_interpolation_to_compose_strings # not yet tested # - prefer_interpolation_to_compose_strings # not yet tested
- prefer_is_empty - prefer_is_empty
- prefer_is_not_empty - prefer_is_not_empty
- public_member_api_docs # this is the only difference from .analysis_options_repo - public_member_api_docs # this is the only difference from analysis_options_repo.yaml
# - recursive_getters # https://github.com/dart-lang/linter/issues/452 # - recursive_getters # https://github.com/dart-lang/linter/issues/452
- slash_for_doc_comments - slash_for_doc_comments
- sort_constructors_first - sort_constructors_first
......
...@@ -9,7 +9,7 @@ assert(is_fuchsia) ...@@ -9,7 +9,7 @@ assert(is_fuchsia)
flutter_app("flutter_gallery") { flutter_app("flutter_gallery") {
main_dart = "lib/main.dart" main_dart = "lib/main.dart"
analysis_options = "//lib/flutter/.analysis_options" analysis_options = "//lib/flutter/analysis_options.yaml"
deps = [ deps = [
"//lib/flutter/packages/flutter", "//lib/flutter/packages/flutter",
......
...@@ -7,7 +7,7 @@ import("//build/dart/dart_package.gni") ...@@ -7,7 +7,7 @@ import("//build/dart/dart_package.gni")
dart_package("flutter") { dart_package("flutter") {
package_name = "flutter" package_name = "flutter"
analysis_options = "//lib/flutter/.analysis_options" analysis_options = "//lib/flutter/analysis_options.yaml"
deps = [ deps = [
"//third_party/dart-pkg/pub/async", "//third_party/dart-pkg/pub/async",
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer # https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer
# #
# There are three similar analysis options files in the flutter repo: # There are three similar analysis options files in the flutter repo:
# - .analysis_options # - analysis_options.yaml
# - .analysis_options_repo # - analysis_options_repo.yaml
# - packages/flutter/lib/analysis_options_user.yaml (this file) # - packages/flutter/lib/analysis_options_user.yaml (this file)
# #
# This file contains the analysis options used by "flutter analyze" # This file contains the analysis options used by "flutter analyze"
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
# It isn't named 'analysis_options.yaml' because otherwise editors like Atom # It isn't named 'analysis_options.yaml' because otherwise editors like Atom
# would use it when analyzing the flutter tool itself. # would use it when analyzing the flutter tool itself.
# #
# When editing, make sure you keep /.analysis_options consistent. # When editing, make sure you keep /analysis_options.yaml consistent.
analyzer: analyzer:
language: language:
......
...@@ -7,7 +7,7 @@ import("//build/dart/dart_package.gni") ...@@ -7,7 +7,7 @@ import("//build/dart/dart_package.gni")
dart_package("flutter_test") { dart_package("flutter_test") {
package_name = "flutter_test" package_name = "flutter_test"
analysis_options = "//lib/flutter/.analysis_options" analysis_options = "//lib/flutter/analysis_options.yaml"
deps = [ deps = [
"//lib/flutter/packages/flutter", "//lib/flutter/packages/flutter",
......
...@@ -8,7 +8,7 @@ import("//build/dart/dart_tool.gni") ...@@ -8,7 +8,7 @@ import("//build/dart/dart_tool.gni")
dart_package("flutter_tools") { dart_package("flutter_tools") {
package_name = "flutter_tools" package_name = "flutter_tools"
analysis_options = "//lib/flutter/.analysis_options" analysis_options = "//lib/flutter/analysis_options.yaml"
deps = [ deps = [
"//dart/pkg/analyzer", "//dart/pkg/analyzer",
...@@ -42,7 +42,7 @@ dart_package("flutter_tools") { ...@@ -42,7 +42,7 @@ dart_package("flutter_tools") {
dart_tool("fuchsia_builder") { dart_tool("fuchsia_builder") {
main_dart = "bin/fuchsia_builder.dart" main_dart = "bin/fuchsia_builder.dart"
analysis_options = "//lib/flutter/.analysis_options" analysis_options = "//lib/flutter/analysis_options.yaml"
deps = [ deps = [
":flutter_tools", ":flutter_tools",
...@@ -52,7 +52,7 @@ dart_tool("fuchsia_builder") { ...@@ -52,7 +52,7 @@ dart_tool("fuchsia_builder") {
dart_tool("fuchsia_tester") { dart_tool("fuchsia_tester") {
main_dart = "bin/fuchsia_tester.dart" main_dart = "bin/fuchsia_tester.dart"
analysis_options = "//lib/flutter/.analysis_options" analysis_options = "//lib/flutter/analysis_options.yaml"
deps = [ deps = [
":flutter_tools", ":flutter_tools",
......
...@@ -147,7 +147,7 @@ class AnalyzeOnce extends AnalyzeBase { ...@@ -147,7 +147,7 @@ class AnalyzeOnce extends AnalyzeBase {
final DriverOptions options = new DriverOptions(); final DriverOptions options = new DriverOptions();
options.dartSdkPath = argResults['dart-sdk']; options.dartSdkPath = argResults['dart-sdk'];
options.packageMap = packages; options.packageMap = packages;
options.analysisOptionsFile = fs.path.join(Cache.flutterRoot, '.analysis_options_repo'); options.analysisOptionsFile = fs.path.join(Cache.flutterRoot, 'analysis_options_repo.yaml');
final AnalysisDriver analyzer = new AnalysisDriver(options); final AnalysisDriver analyzer = new AnalysisDriver(options);
// TODO(pq): consider error handling // TODO(pq): consider error handling
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment