Skip to content

Commit

Permalink
Become compatible with latest lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
passsy committed Aug 1, 2022
1 parent 0cb0056 commit fe67127
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 48 deletions.
80 changes: 40 additions & 40 deletions sidekick/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "40.0.0"
version: "43.0.0"
acronym:
dependency: "direct main"
description:
Expand All @@ -21,14 +21,14 @@ packages:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.0"
version: "4.3.1"
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "3.3.0"
version: "3.3.1"
args:
dependency: "direct main"
description:
Expand Down Expand Up @@ -64,13 +64,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.1"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
checked_yaml:
dependency: transitive
description:
Expand Down Expand Up @@ -98,7 +91,7 @@ packages:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
collection:
dependency: transitive
description:
Expand All @@ -112,14 +105,14 @@ packages:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "3.0.2"
coverage:
dependency: transitive
description:
name: coverage
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.2"
version: "1.5.0"
crypto:
dependency: transitive
description:
Expand All @@ -140,7 +133,7 @@ packages:
name: dart_console
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.1.2"
dartx:
dependency: "direct main"
description:
Expand Down Expand Up @@ -203,7 +196,7 @@ packages:
name: glob
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "2.1.0"
globbing:
dependency: transitive
description:
Expand All @@ -224,21 +217,28 @@ packages:
name: http_multi_server
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.0"
version: "3.2.1"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
version: "4.0.1"
ini:
dependency: transitive
description:
name: ini
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
intl:
dependency: transitive
description:
name: intl
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.0"
io:
dependency: transitive
description:
Expand All @@ -259,14 +259,14 @@ packages:
name: json_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "4.5.0"
version: "4.6.0"
lint:
dependency: "direct dev"
description:
name: lint
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
version: "1.10.0"
logging:
dependency: transitive
description:
Expand Down Expand Up @@ -294,21 +294,21 @@ packages:
name: mason_logger
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.0-dev.8"
version: "0.1.1"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
version: "0.12.12"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
version: "1.8.0"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -336,14 +336,14 @@ packages:
name: package_config
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
version: "2.1.0"
path:
dependency: "direct main"
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.2"
platform:
dependency: transitive
description:
Expand All @@ -357,14 +357,14 @@ packages:
name: pointycastle
url: "https://pub.dartlang.org"
source: hosted
version: "3.6.0"
version: "3.6.1"
pool:
dependency: transitive
description:
name: pool
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.0"
version: "1.5.1"
posix:
dependency: transitive
description:
Expand Down Expand Up @@ -399,7 +399,7 @@ packages:
name: pubspec
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.3.0"
quiver:
dependency: transitive
description:
Expand Down Expand Up @@ -441,28 +441,28 @@ packages:
name: shelf
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.3.2"
shelf_packages_handler:
dependency: transitive
description:
name: shelf_packages_handler
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
version: "3.0.1"
shelf_static:
dependency: transitive
description:
name: shelf_static
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.1.1"
shelf_web_socket:
dependency: transitive
description:
name: shelf_web_socket
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "1.0.2"
sidekick_core:
dependency: "direct main"
description:
Expand Down Expand Up @@ -490,7 +490,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.0"
version: "1.9.1"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -525,35 +525,35 @@ packages:
name: system_info2
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
version: "2.0.4"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.2.1"
test:
dependency: "direct dev"
description:
name: test
url: "https://pub.dartlang.org"
source: hosted
version: "1.21.1"
version: "1.21.4"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.9"
version: "0.4.12"
test_core:
dependency: transitive
description:
name: test_core
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.13"
version: "0.4.16"
test_process:
dependency: "direct dev"
description:
Expand All @@ -567,7 +567,7 @@ packages:
name: time
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
typed_data:
dependency: transitive
description:
Expand Down Expand Up @@ -616,7 +616,7 @@ packages:
name: vm_service
url: "https://pub.dartlang.org"
source: hosted
version: "8.3.0"
version: "9.3.0"
watcher:
dependency: transitive
description:
Expand All @@ -637,7 +637,7 @@ packages:
name: webkit_inspection_protocol
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
version: "1.1.0"
win32:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion sidekick/test/util/local_testing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:path/path.dart';
import 'package:sidekick_core/sidekick_core.dart';

/// True when dependencies should be linked to local sidekick dependencies
late bool shouldUseLocalDevs = env['SIDEKICK_LOCAL_DEPS'] == 'true';
bool shouldUseLocalDevs = env['SIDEKICK_LOCAL_DEPS'] == 'true';

/// Add this to the test name
String localOrPubDepsLabel = shouldUseLocalDevs ? "(local)" : "(pub)";
Expand Down
12 changes: 5 additions & 7 deletions sidekick_core/lib/src/cli_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ bool isProgramInstalled(String name) {
///
/// The file name is the md5 hash of the content, therefore doesn't create a new file when called with the same content
io.File tempExecutableScriptFile(String content, {Directory? tempDir}) {
final io.Directory _tempDir =
tempDir ?? Directory.systemTemp.createTempSync();
final script = _tempDir.file('${content.md5}.sh')
..createSync(recursive: true);
final io.Directory dir = tempDir ?? Directory.systemTemp.createTempSync();
final script = dir.file('${content.md5}.sh')..createSync(recursive: true);
script.writeAsStringSync(content);
posix.chmod(script.path, permission: '755');
return script;
Expand All @@ -44,15 +42,15 @@ dcli.Progress writeAndRunShellScript(
dcli.Progress? progress,
}) {
final script = tempExecutableScriptFile(scriptContent);
final Progress _progress =
final Progress scriptProgress =
progress ?? Progress(print, stderr: printerr, captureStderr: true);

try {
return dcli.start(
script.absolute.path,
workingDirectory:
workingDirectory?.absolute.path ?? entryWorkingDirectory.path,
progress: _progress,
progress: scriptProgress,
);
} catch (e) {
print(
Expand All @@ -62,7 +60,7 @@ dcli.Progress writeAndRunShellScript(
if (progress == null) {
print(
"The captured error of running the script is:\n"
"${_progress.toList().join('\n')}\n",
"${scriptProgress.toList().join('\n')}\n",
);
}
rethrow;
Expand Down

0 comments on commit fe67127

Please sign in to comment.