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: 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..f225e4974172 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