Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem committed Aug 16, 2023
1 parent 88b9cdc commit 8ea5c40
Show file tree
Hide file tree
Showing 6 changed files with 234 additions and 155 deletions.
18 changes: 18 additions & 0 deletions executors/dart_web/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
include: package:lints/recommended.yaml

analyzer:
language:
strict-raw-types: true
errors:
deprecated_member_use_from_same_package: ignore

linter:
rules:
- always_declare_return_types
- directives_ordering
- prefer_single_quotes
- sort_pub_dependencies
- unnecessary_parenthesis
- avoid_dynamic_calls
- type_annotate_public_apis
- non_constant_identifier_names
6 changes: 3 additions & 3 deletions executors/dart_web/bin/collator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import 'package:intl4x/collation.dart';
import 'package:intl4x/intl4x.dart';

String testCollationShort(String jsonEncoded) {
var json =
jsonDecode(jsonEncoded); // For the moment, use strings for easier interop
var json = jsonDecode(jsonEncoded)
as Map<String, dynamic>; // For the moment, use strings for easier interop
// Global default locale
var testLocale = 'en';
Map<String, dynamic> outputLine;
Expand All @@ -28,7 +28,7 @@ String testCollationShort(String jsonEncoded) {
var collationOptions = CollationOptions(ignorePunctuation: true);
var compared = coll.collation(collationOptions).compare(d1, d2);
var result = compared <= 0 ? true : false;
outputLine = {'label': json['label'], "result": result};
outputLine = {'label': json['label'], 'result': result};

if (result != true) {
// Additional info for the comparison
Expand Down
3 changes: 2 additions & 1 deletion executors/dart_web/bin/make_runnable_by_node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Future<void> prepare(String name, ExportFunction function) async {
'compile',
'js',
'bin/${name}Executor.dart',
'-O0',
'-o',
'out/$outFile.js',
]);
Expand Down Expand Up @@ -83,6 +84,6 @@ void prepareOutFile(String name, List<ExportFunction> functions) {
//# sourceMappingURL=$name.js.map
''',
);
s = 'function dartMainRunner(main, args){}' + s;
s = 'function dartMainRunner(main, args){}$s';
outFile.writeAsStringSync(s);
}
Loading

0 comments on commit 8ea5c40

Please sign in to comment.