From 576aab08334e9f7989b32620cdc6b58d31162111 Mon Sep 17 00:00:00 2001 From: Christopher Fujino Date: Mon, 13 Sep 2021 15:47:03 -0700 Subject: [PATCH] add analysis_options.yaml to dev/conductor (#90005) --- dev/conductor/analysis_options.yaml | 16 ++++++++++++++++ dev/conductor/lib/git.dart | 6 ++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 dev/conductor/analysis_options.yaml diff --git a/dev/conductor/analysis_options.yaml b/dev/conductor/analysis_options.yaml new file mode 100644 index 0000000000..23b1a2c526 --- /dev/null +++ b/dev/conductor/analysis_options.yaml @@ -0,0 +1,16 @@ +# Use the analysis options settings from the top level of the repo (not +# the ones from above, which include the `public_member_api_docs` rule). + +include: ../../analysis_options.yaml + +analyzer: + exclude: + # Ignore protoc generated files + - "lib/proto/*" +linter: + rules: + avoid_catches_without_on_clauses: true + curly_braces_in_flow_control_structures: true + library_private_types_in_public_api: false # Tool does not have any public API + prefer_relative_imports: true + unawaited_futures: true diff --git a/dev/conductor/lib/git.dart b/dev/conductor/lib/git.dart index 41ed5fc9c0..f81de2d3ec 100644 --- a/dev/conductor/lib/git.dart +++ b/dev/conductor/lib/git.dart @@ -63,10 +63,12 @@ class Git { } else { message.writeln('Command "git ${args.join(' ')}" failed to $explanation.'); } - if ((result.stdout as String).isNotEmpty) + if ((result.stdout as String).isNotEmpty) { message.writeln('stdout from git:\n${result.stdout}\n'); - if ((result.stderr as String).isNotEmpty) + } + if ((result.stderr as String).isNotEmpty) { message.writeln('stderr from git:\n${result.stderr}\n'); + } throw GitException(message.toString()); } }