Skip to content

Commit 5ec981b

Browse files
committed
chore: fix linter issues
1 parent 9674044 commit 5ec981b

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

bin/commands/upload_so_files.dart

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
part of '../instabug.dart';
22

3-
/**
4-
* This script uploads .so files to the specified endpoint used in NDK crash reporting.
5-
* Usage: dart run instabug_flutter:instabug upload-so-files --arch <arch> --file <path> --api_key <key> --token <token> --name <name>
6-
*/
7-
83
class UploadSoFilesOptions {
94
final String arch;
105
final String file;
@@ -22,6 +17,8 @@ class UploadSoFilesOptions {
2217
}
2318

2419
// ignore: avoid_classes_with_only_static_members
20+
/// This script uploads .so files to the specified endpoint used in NDK crash reporting.
21+
/// Usage: dart run instabug_flutter:instabug upload-so-files --arch \<arch\> --file \<path\> --api_key \<key\> --token \<token\> --name \<name\>
2522
class UploadSoFilesCommand {
2623
static const List<String> validArchs = [
2724
'x86',
@@ -91,16 +88,19 @@ class UploadSoFilesCommand {
9188
// validate file is a zip file
9289
if (!file.path.endsWith('.zip')) {
9390
stderr.writeln(
94-
'[Instabug-CLI] Error: File is not a zip file: ${options.file}');
91+
'[Instabug-CLI] Error: File is not a zip file: ${options.file}',
92+
);
9593
throw Exception('File is not a zip file: ${options.file}');
9694
}
9795

9896
// Validate architecture
9997
if (!validArchs.contains(options.arch)) {
10098
stderr.writeln(
101-
'[Instabug-CLI] Error: Invalid architecture: ${options.arch}. Valid options: ${validArchs.join(', ')}');
99+
'[Instabug-CLI] Error: Invalid architecture: ${options.arch}. Valid options: ${validArchs.join(', ')}',
100+
);
102101
throw Exception(
103-
'Invalid architecture: ${options.arch}. Valid options: ${validArchs.join(', ')}');
102+
'Invalid architecture: ${options.arch}. Valid options: ${validArchs.join(', ')}',
103+
);
104104
}
105105

106106
stdout.writeln('Uploading .so files...');
@@ -141,7 +141,8 @@ class UploadSoFilesCommand {
141141
}
142142

143143
stdout.writeln(
144-
'Successfully uploaded .so files for version: ${options.name} with arch ${options.arch}');
144+
'Successfully uploaded .so files for version: ${options.name} with arch ${options.arch}',
145+
);
145146
exit(0);
146147
} catch (e) {
147148
stderr.writeln('[Instabug-CLI] Error uploading .so files, $e');

bin/instabug.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import 'package:http/http.dart' as http;
77

88
part 'commands/upload_so_files.dart';
99

10-
// Command registry for easy management
1110
// ignore: avoid_classes_with_only_static_members
11+
/// Command registry for easy management
1212
class CommandRegistry {
1313
static final Map<String, CommandHandler> _commands = {
1414
'upload-so-files': CommandHandler(
@@ -60,14 +60,16 @@ void main(List<String> args) async {
6060
} else {
6161
stderr.writeln('Unknown command: ${command.name}');
6262
stdout.writeln(
63-
'Available commands: ${CommandRegistry.commandNames.join(', ')}');
63+
'Available commands: ${CommandRegistry.commandNames.join(', ')}',
64+
);
6465
exit(1);
6566
}
6667
} else {
6768
stderr.writeln('No applicable command found');
6869
stdout.writeln('Usage: instabug [options] <command>');
6970
stdout.writeln(
70-
'Available commands: ${CommandRegistry.commandNames.join(', ')}');
71+
'Available commands: ${CommandRegistry.commandNames.join(', ')}',
72+
);
7173
stdout.writeln('For help on a specific command:');
7274
stdout.writeln(' instabug <command> --help');
7375
stdout.writeln(parser.usage);

0 commit comments

Comments
 (0)