From 6336caab1fd4ca4908f236cd93fc098db267979c Mon Sep 17 00:00:00 2001 From: Dan Field Date: Tue, 17 Dec 2019 15:05:00 -0800 Subject: [PATCH 1/3] fix docs for fuchsia_ctl --- packages/fuchsia_ctl/analysis_options.yaml | 6 ------ packages/fuchsia_ctl/lib/src/dev_finder.dart | 3 +++ packages/fuchsia_ctl/lib/src/image_paver.dart | 2 +- packages/fuchsia_ctl/lib/src/operation_result.dart | 1 + packages/fuchsia_ctl/lib/src/ssh_client.dart | 4 ++++ packages/fuchsia_ctl/lib/src/ssh_key_manager.dart | 11 ++++++++++- packages/fuchsia_ctl/lib/src/tar.dart | 3 +++ 7 files changed, 22 insertions(+), 8 deletions(-) delete mode 100644 packages/fuchsia_ctl/analysis_options.yaml diff --git a/packages/fuchsia_ctl/analysis_options.yaml b/packages/fuchsia_ctl/analysis_options.yaml deleted file mode 100644 index d9742aba00c1..000000000000 --- a/packages/fuchsia_ctl/analysis_options.yaml +++ /dev/null @@ -1,6 +0,0 @@ -include: ../../analysis_options.yaml - -analyzer: -linter: - rules: - public_member_api_docs: false # TODO(goderbauer): enable when package is ready. diff --git a/packages/fuchsia_ctl/lib/src/dev_finder.dart b/packages/fuchsia_ctl/lib/src/dev_finder.dart index bd70d605be2e..9cfaaaeb7947 100644 --- a/packages/fuchsia_ctl/lib/src/dev_finder.dart +++ b/packages/fuchsia_ctl/lib/src/dev_finder.dart @@ -129,8 +129,11 @@ class DevFinder { /// The exception thrown when a [DevFinder] lookup fails. class DevFinderException implements Exception { + /// Creates a new [DevFinderException], such as when dev_finder fails to find + /// a device. const DevFinderException(this.message); + /// The user-facing message to display. final String message; @override diff --git a/packages/fuchsia_ctl/lib/src/image_paver.dart b/packages/fuchsia_ctl/lib/src/image_paver.dart index c8082023ba4b..cb837696c651 100644 --- a/packages/fuchsia_ctl/lib/src/image_paver.dart +++ b/packages/fuchsia_ctl/lib/src/image_paver.dart @@ -41,7 +41,7 @@ class ImagePaver { /// The [FileSystem] implementation used to final FileSystem fs; - // The implementation to use for untarring system images. + /// The implementation to use for untarring system images. final Tar tar; /// The implementation to use for creating SSH keys. diff --git a/packages/fuchsia_ctl/lib/src/operation_result.dart b/packages/fuchsia_ctl/lib/src/operation_result.dart index bba5eb850cf3..b4c76cbde7f7 100644 --- a/packages/fuchsia_ctl/lib/src/operation_result.dart +++ b/packages/fuchsia_ctl/lib/src/operation_result.dart @@ -38,6 +38,7 @@ class OperationResult { return OperationResult._(false, info: info, error: error); } + /// Creates an [OperationResult] from a [ProcessResult]. factory OperationResult.fromProcessResult( ProcessResult result, { int expectedExitCode = 0, diff --git a/packages/fuchsia_ctl/lib/src/ssh_client.dart b/packages/fuchsia_ctl/lib/src/ssh_client.dart index 186737d29917..ede6a2606780 100644 --- a/packages/fuchsia_ctl/lib/src/ssh_client.dart +++ b/packages/fuchsia_ctl/lib/src/ssh_client.dart @@ -25,6 +25,10 @@ class SshClient { /// The [ProcessManager] to use for spawning `ssh`. final ProcessManager processManager; + /// Creates a list of arguments to pass to ssh. + /// + /// This method is not intended for use outside of this library, except for + /// in unit tests. @visibleForTesting List getSshArguments({ String identityFilePath, diff --git a/packages/fuchsia_ctl/lib/src/ssh_key_manager.dart b/packages/fuchsia_ctl/lib/src/ssh_key_manager.dart index 46c229646743..3176d30c24a0 100644 --- a/packages/fuchsia_ctl/lib/src/ssh_key_manager.dart +++ b/packages/fuchsia_ctl/lib/src/ssh_key_manager.dart @@ -25,12 +25,21 @@ abstract class SshKeyManager { /// A class that delegates creating SSH keys to the system `ssh-keygen`. @immutable class SystemSshKeyManager implements SshKeyManager { + /// Creates a wrapper for ssh-keygen. + /// + /// The arguments must not be null, and will be used to spawn a ssh-keygen + /// process and manipulate the files it creates. const SystemSshKeyManager({ this.processManager = const LocalProcessManager(), this.fs = const LocalFileSystem(), - }); + }) : assert(processManager != null), + assert(fs != null); + /// The [ProcessManager] implementation to use when spawning ssh-keygen. final ProcessManager processManager; + + /// The [FileSystem] implementation to use when creating the authorized_keys + /// file. final FileSystem fs; @override diff --git a/packages/fuchsia_ctl/lib/src/tar.dart b/packages/fuchsia_ctl/lib/src/tar.dart index 22d82adad980..9ab2167f976b 100644 --- a/packages/fuchsia_ctl/lib/src/tar.dart +++ b/packages/fuchsia_ctl/lib/src/tar.dart @@ -16,6 +16,7 @@ abstract class Tar { /// A const constructor to allow subclasses to create const constructors. const Tar(); + /// Untars a tar file. Future untar(String src, String destination); } @@ -30,6 +31,8 @@ class SystemTar implements Tar { this.processManager = const LocalProcessManager(), }) : assert(processManager != null); + /// The [ProcessManager] impleemntation to use when spawning the system tar + /// program. final ProcessManager processManager; @override From d008e66bce31fcb8518570a3cb46722930970bf2 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Tue, 17 Dec 2019 15:21:28 -0800 Subject: [PATCH 2/3] format --- packages/fuchsia_ctl/lib/src/ssh_key_manager.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/fuchsia_ctl/lib/src/ssh_key_manager.dart b/packages/fuchsia_ctl/lib/src/ssh_key_manager.dart index 3176d30c24a0..f225e4974172 100644 --- a/packages/fuchsia_ctl/lib/src/ssh_key_manager.dart +++ b/packages/fuchsia_ctl/lib/src/ssh_key_manager.dart @@ -32,8 +32,8 @@ class SystemSshKeyManager implements SshKeyManager { const SystemSshKeyManager({ this.processManager = const LocalProcessManager(), this.fs = const LocalFileSystem(), - }) : assert(processManager != null), - assert(fs != null); + }) : assert(processManager != null), + assert(fs != null); /// The [ProcessManager] implementation to use when spawning ssh-keygen. final ProcessManager processManager; From f361d3b0b9e2d4533178ba7df047c9d2d74a5c75 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Tue, 17 Dec 2019 16:00:43 -0800 Subject: [PATCH 3/3] cirrusyaml --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index f69e48b07fac..0eb22c138a80 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -11,8 +11,8 @@ task: activate_script: pub global activate flutter_plugin_tools matrix: - name: analyze - # TODO(goderbauer): remove custom-analysis once fuchsia_ctl and gauge have proper API docs. - script: ./script/incremental_build.sh analyze --custom-analysis fuchsia_ctl,gauge + # TODO(goderbauer): remove custom-analysis once gauge has proper API docs. + script: ./script/incremental_build.sh analyze --custom-analysis gauge - name: publishable script: ./script/check_publish.sh depends_on: