diff --git a/mono_repo/lib/src/ci_shared.dart b/mono_repo/lib/src/ci_shared.dart index 968d70c6..de1e71d5 100644 --- a/mono_repo/lib/src/ci_shared.dart +++ b/mono_repo/lib/src/ci_shared.dart @@ -135,7 +135,7 @@ List scriptLines(String scriptPath) => [ 'It appears you are using Windows, and may not have access to chmod.', 'If you are using git, the following will emulate the Unix permissions ' 'change:', - ' git update-index --add --chmod=+x $scriptPath' + ' git update-index --add --chmod=+x $scriptPath', ], ]; diff --git a/mono_repo/lib/src/commands/github/action_info.dart b/mono_repo/lib/src/commands/github/action_info.dart index 663eba00..0f9eb1dd 100644 --- a/mono_repo/lib/src/commands/github/action_info.dart +++ b/mono_repo/lib/src/commands/github/action_info.dart @@ -85,10 +85,10 @@ Job _coverageCompletionJob(RootConfig rootConfig) => Job( withContent: { // https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow 'github-token': r'${{ secrets.GITHUB_TOKEN }}', - 'parallel-finished': true + 'parallel-finished': true, }, versionOverrides: rootConfig.existingActionVersions, - ) + ), ], ); diff --git a/mono_repo/lib/src/commands/github/generate.dart b/mono_repo/lib/src/commands/github/generate.dart index bc6e315d..605609ca 100644 --- a/mono_repo/lib/src/commands/github/generate.dart +++ b/mono_repo/lib/src/commands/github/generate.dart @@ -73,7 +73,7 @@ class _GeneratedDependabotConfig { config['updates'] = [ ...config['updates'] as List? ?? [], - ...packageUpdates + ...packageUpdates, ]; result['.github/dependabot.yml'] = ''' $createdWith diff --git a/mono_repo/lib/src/commands/github/github_yaml.dart b/mono_repo/lib/src/commands/github/github_yaml.dart index bd75b458..e461aa93 100644 --- a/mono_repo/lib/src/commands/github/github_yaml.dart +++ b/mono_repo/lib/src/commands/github/github_yaml.dart @@ -481,13 +481,13 @@ Step _cacheEntries( 'pub-cache-hosted', if (additionalCacheKeys != null) ...[ for (var entry in additionalCacheKeys.entries) - '${entry.key}:${entry.value}' - ] + '${entry.key}:${entry.value}', + ], ]; final restoreKeys = [ for (var i = cacheKeyParts.length; i > 0; i--) - _maxLength(cacheKeyParts.take(i).join(';')) + _maxLength(cacheKeyParts.take(i).join(';')), ]; // Just caching the `hosted` directory because caching git dependencies or diff --git a/mono_repo/lib/src/commands/readme_command.dart b/mono_repo/lib/src/commands/readme_command.dart index de88c71b..a1011def 100644 --- a/mono_repo/lib/src/commands/readme_command.dart +++ b/mono_repo/lib/src/commands/readme_command.dart @@ -52,7 +52,7 @@ String readme( '[${pkg.pubspec.name}](${pkg.relativePath}/)', pkg.pubspec.description?.trim() ?? '', pkg.pubspec.pubBadge, - ] + ], ]; final widths = [1, 1, 1]; diff --git a/mono_repo/lib/src/github_config.dart b/mono_repo/lib/src/github_config.dart index 3def634a..4429e4ad 100644 --- a/mono_repo/lib/src/github_config.dart +++ b/mono_repo/lib/src/github_config.dart @@ -113,11 +113,11 @@ class GitHubConfig { 'name': workflowName, if (on != null) 'on': on, 'defaults': { - 'run': {'shell': 'bash'} + 'run': {'shell': 'bash'}, }, 'env': {'PUB_ENVIRONMENT': 'bot.github', ...?env}, // Declare default permissions as read only. - 'permissions': 'read-all' + 'permissions': 'read-all', }; } @@ -152,8 +152,8 @@ Map _parseOn(Map? on, String? cron) { return { ..._defaultOn, 'schedule': [ - {'cron': cron} - ] + {'cron': cron}, + ], }; } } @@ -174,7 +174,7 @@ const _defaultOn = { 'branches': [ 'main', 'master', - ] + ], }, // A `null` value here means all pull requests are processed by this workflow. 'pull_request': null, diff --git a/mono_repo/lib/src/raw_config.dart b/mono_repo/lib/src/raw_config.dart index 76b23b27..de71c062 100644 --- a/mono_repo/lib/src/raw_config.dart +++ b/mono_repo/lib/src/raw_config.dart @@ -31,7 +31,7 @@ class RawConfig { this.cache, }) : stages = stages ?? [ - RawStage('unit_test', ['test']) + RawStage('unit_test', ['test']), ] { if (sdks != null) { sortNormalizeVerifySdksList( diff --git a/mono_repo/lib/src/task_type.dart b/mono_repo/lib/src/task_type.dart index edd88a9d..efb9baba 100644 --- a/mono_repo/lib/src/task_type.dart +++ b/mono_repo/lib/src/task_type.dart @@ -90,7 +90,7 @@ class _AnalyzeTask extends TaskType { @override List commandValue(PackageFlavor flavor, String? args) => [ flavor == PackageFlavor.dart ? 'dart analyze' : 'flutter analyze', - if (args != null) args + if (args != null) args, ]; @override diff --git a/mono_repo/lib/src/yaml.dart b/mono_repo/lib/src/yaml.dart index 6549d1fe..aa3167db 100644 --- a/mono_repo/lib/src/yaml.dart +++ b/mono_repo/lib/src/yaml.dart @@ -294,7 +294,7 @@ const _escapeMap = { '\f': r'\f', // 0C - form feed '\r': r'\r', // 0D - carriage return '\x7F': r'\x7F', // delete - r'\': r'\\' // backslash + r'\': r'\\', // backslash }; final _escapeMapRegexp = _escapeMap.keys.map(_getHexLiteral).join(); diff --git a/mono_repo/test/check_comand_test.dart b/mono_repo/test/check_comand_test.dart index 7efb85c9..87e96b91 100644 --- a/mono_repo/test/check_comand_test.dart +++ b/mono_repo/test/check_comand_test.dart @@ -106,7 +106,7 @@ name: no_mono_repo_file dependencies: build: any implied_any: -''') +'''), ]).create(); await d.dir('foo', [ @@ -117,7 +117,7 @@ name: foo dependencies: build: any implied_any: -''') +'''), ]).create(); await d.dir('bar', [ @@ -131,7 +131,7 @@ dependencies: url: https://github.com/dart-lang/build.git path: build ref: hacking -''') +'''), ]).create(); await d.dir('baz', [ @@ -180,6 +180,6 @@ flutter: - asset: fonts/Schyler-Italic.ttf style: italic weight: 700 -''') +'''), ]).create(); } diff --git a/mono_repo/test/generate_test.dart b/mono_repo/test/generate_test.dart index 6b89d604..9f7acb2d 100644 --- a/mono_repo/test/generate_test.dart +++ b/mono_repo/test/generate_test.dart @@ -60,7 +60,7 @@ void main() { d.file('mono_pkg.yaml', 'bob'), d.file('pubspec.yaml', ''' name: pkg_name - ''') + '''), ]).create(); final path = p.join('sub_pkg', 'mono_pkg.yaml'); @@ -75,7 +75,7 @@ name: pkg_name d.file('mono_pkg.yaml', '# just a comment!'), d.file('pubspec.yaml', ''' name: pkg_name - ''') + '''), ]).create(); expect( @@ -103,7 +103,7 @@ stages: '''), d.file('pubspec.yaml', ''' name: pkg_name - ''') + '''), ]).create(); expect( @@ -129,7 +129,7 @@ stages: '''), d.file('pubspec.yaml', ''' name: pkg_name - ''') + '''), ]).create(); expect( @@ -160,14 +160,14 @@ name: pkg_name 'sdk': values, 'stages': [ { - 'unit_test': ['test'] + 'unit_test': ['test'], } - ] + ], }), ), d.file('pubspec.yaml', ''' name: pkg_name - ''') + '''), ]).create(); expect( @@ -194,14 +194,14 @@ name: pkg_name 'test': '', 'sdk': values, } - ] + ], } - ] + ], }), ), d.file('pubspec.yaml', ''' name: pkg_name - ''') + '''), ]).create(); expect( @@ -224,7 +224,7 @@ name: pkg_name d.file('.mono_repo.yml', ''), d.file('pubspec.yaml', ''' name: pkg_name - ''') + '''), ]).create(); expect( @@ -251,7 +251,7 @@ stages: '''), d.file('pubspec.yaml', ''' name: pkg_a - ''') + '''), ]).create(); await d.dir('pkg_b', [ @@ -267,7 +267,7 @@ stages: '''), d.file('pubspec.yaml', ''' name: pkg_b - ''') + '''), ]).create(); expect( @@ -351,7 +351,7 @@ github: d.file(monoPkgFileName, testConfig2), d.file('pubspec.yaml', ''' name: pkg_name - ''') + '''), ]).create(); testGenerateConfig( @@ -367,7 +367,7 @@ name: pkg_name name: pkg_name environment: sdk: '>=2.1.0 <3.0.0' -''') +'''), ]).create(); testGenerateConfig( @@ -382,7 +382,7 @@ ${_writeScriptOutput(false)}''', test('max cache key', () async { final monoConfigContent = toYaml({ - 'merge_stages': ['format'] + 'merge_stages': ['format'], }); await populateConfig(monoConfigContent); @@ -403,7 +403,7 @@ stages: '''), d.file('pubspec.yaml', ''' name: pkg_a - ''') + '''), ]).create(); } @@ -438,7 +438,7 @@ cache: '''), d.file('pubspec.yaml', ''' name: pkg_a - ''') + '''), ]).create(); await d.dir('pkg_b', [ @@ -457,7 +457,7 @@ cache: '''), d.file('pubspec.yaml', ''' name: pkg_b - ''') + '''), ]).create(); testGenerateConfig( @@ -509,7 +509,7 @@ cache: '''), d.file('pubspec.yaml', ''' name: pkg_a - ''') + '''), ]).create(); await d.dir('pkg_b', [ @@ -528,7 +528,7 @@ cache: '''), d.file('pubspec.yaml', ''' name: pkg_b - ''') + '''), ]).create(); testGenerateConfig( @@ -575,7 +575,7 @@ stages: '''), d.file('pubspec.yaml', ''' name: pkg_a - ''') + '''), ]).create(); expect( @@ -623,7 +623,7 @@ stages: '''), d.file('pubspec.yaml', ''' name: pkg_a - ''') + '''), ]).create(); testGenerateConfig( @@ -656,7 +656,7 @@ stages: '''), d.file('pubspec.yaml', ''' name: pkg_a - ''') + '''), ]).create(); testGenerateConfig( @@ -688,7 +688,7 @@ environment: dependencies: flutter: sdk: flutter - ''') + '''), ]).create(); expect( @@ -716,7 +716,7 @@ stages: '''), d.file('pubspec.yaml', ''' name: pkg_a -''') +'''), ]).create(); expect( @@ -740,7 +740,7 @@ sdk: stages: - unit_test - before_script: "echo hi" -''') +'''), ]).create(); expect( @@ -771,7 +771,7 @@ sdk: stages: - unit_test: $lines -''') +'''), ]).create(); testGenerateConfig(printMatcher: isNotEmpty); @@ -815,7 +815,7 @@ $lines 'disallows unsupported keys', () => _testBadConfig( { - 'other': {'stages': 5} + 'other': {'stages': 5}, }, r''' line 2, column 3 of mono_repo.yaml: Unsupported value for "other". Only `github`, `merge_stages`, `pretty_ansi`, `pub_action`, `self_validate`, `coverage_service` keys are supported. @@ -831,7 +831,7 @@ line 2, column 3 of mono_repo.yaml: Unsupported value for "other". Only `github` 'must be a list', () => _testBadConfig( { - 'merge_stages': {'stages': 5} + 'merge_stages': {'stages': 5}, }, startsWith( 'line 2, column 3 of mono_repo.yaml: Unsupported value for ' @@ -844,7 +844,7 @@ line 2, column 3 of mono_repo.yaml: Unsupported value for "other". Only `github` 'must be String items', () => _testBadConfig( { - 'merge_stages': [5] + 'merge_stages': [5], }, startsWith( 'line 2, column 3 of mono_repo.yaml: Unsupported value for ' @@ -855,7 +855,7 @@ line 2, column 3 of mono_repo.yaml: Unsupported value for "other". Only `github` test('must match a configured stage from pkg_config', () async { final monoConfigContent = toYaml({ - 'merge_stages': ['bob'] + 'merge_stages': ['bob'], }); await populateConfig(monoConfigContent); expect( @@ -891,7 +891,7 @@ stages: '''), d.file('pubspec.yaml', r''' name: pkg_a -''') +'''), ]).create(); await d.dir('pkg_b', [ @@ -911,7 +911,7 @@ stages: '''), d.file('pubspec.yaml', ''' name: pkg_b - ''') + '''), ]).create(); await d.dir('pkg_c', [ @@ -930,7 +930,7 @@ name: pkg_c dependencies: flutter: sdk: flutter - ''') + '''), ]).create(); testGenerateConfig( @@ -1222,7 +1222,7 @@ stages: name: pkg_a environment: sdk: '>=2.16.0 <3.0.0' -''') +'''), ]).create(); testGenerateConfig( @@ -1253,7 +1253,7 @@ stages: ), d.file('pubspec.yaml', ''' name: pkg_a -''') +'''), ]).create(); expect( @@ -1281,7 +1281,7 @@ stages: ), d.file('pubspec.yaml', ''' name: pkg_a -''') +'''), ]).create(); expect( @@ -1315,7 +1315,7 @@ environment: dependencies: flutter: sdk: flutter -''') +'''), ]).create(); expect( @@ -1357,7 +1357,7 @@ github: } ] } -''') +'''), ]).validate(); }); @@ -1400,7 +1400,7 @@ github: } ] } -''') +'''), ]).validate(); }); }); @@ -1414,7 +1414,7 @@ String _writeScriptOutput(bool withDependabot) => [ 'Wrote `${p.join(d.sandbox, defaultGitHubWorkflowFilePath)}`.', if (withDependabot) 'Wrote `${p.join(d.sandbox, '.github/dependabot.yml')}`.', - ciScriptPathMessage + ciScriptPathMessage, ].join('\n'); Future _testBadConfig( diff --git a/mono_repo/test/github_command_test.dart b/mono_repo/test/github_command_test.dart index e04c56ac..0e0f1ec0 100644 --- a/mono_repo/test/github_command_test.dart +++ b/mono_repo/test/github_command_test.dart @@ -16,7 +16,7 @@ void main() { 'only supported keys', () => _testBadConfigWithYamlException( { - 'github': {'not_supported': 5} + 'github': {'not_supported': 5}, }, r''' line 2, column 3 of mono_repo.yaml: Unrecognized keys: [not_supported]; supported keys: [env, on, on_completion, dependabot, cron, stages, workflows] @@ -31,7 +31,7 @@ line 2, column 3 of mono_repo.yaml: Unrecognized keys: [not_supported]; supporte '"on" must be a Map', () => _testBadConfigWithYamlException( { - 'github': {'on': 'not a map'} + 'github': {'on': 'not a map'}, }, r''' line 2, column 7 of mono_repo.yaml: Unsupported value for "on". type 'String' is not a subtype of type 'Map?' in type cast @@ -46,7 +46,7 @@ line 2, column 7 of mono_repo.yaml: Unsupported value for "on". type 'String' is 'no cron with on', () => _testBadConfigWithYamlException( { - 'github': {'cron': 'some value', 'on': {}} + 'github': {'cron': 'some value', 'on': {}}, }, r''' line 2, column 9 of mono_repo.yaml: Unsupported value for "cron". Cannot set `cron` if `on` has a value. @@ -82,8 +82,8 @@ line 2, column 8 of mono_repo.yaml: Unsupported value for "env". type 'String' i 'steps': [], 'needs': ['foo'], } - ] - } + ], + }, }, r''' line 3, column 5 of mono_repo.yaml: Unsupported value for "on_completion". Cannot define a `needs` key for `on_completion` jobs, this is filled in for you to depend on all jobs. @@ -100,8 +100,8 @@ line 3, column 5 of mono_repo.yaml: Unsupported value for "on_completion". Canno () => _testBadConfigWithYamlException( { 'github': { - 'on_completion': [{}] - } + 'on_completion': [{}], + }, }, r''' line 3, column 7 of mono_repo.yaml: Required keys are missing: steps. @@ -119,10 +119,10 @@ line 3, column 7 of mono_repo.yaml: Required keys are missing: steps. 'github': { 'on_completion': [ { - 'steps': [{}] + 'steps': [{}], } - ] - } + ], + }, }, r''' line 4, column 11 of mono_repo.yaml: Missing key "uses". Either `run` or `uses` must be defined. @@ -145,10 +145,10 @@ line 4, column 11 of mono_repo.yaml: Missing key "uses". Either `run` or `uses` 'run': 'bob', 'uses': 'bob', } - ] + ], } - ] - } + ], + }, }, r''' line 5, column 17 of mono_repo.yaml: Unsupported value for "uses". `uses` and `run` cannot both be defined. @@ -171,10 +171,10 @@ line 5, column 17 of mono_repo.yaml: Unsupported value for "uses". `uses` and `r 'run': 'bob', 'with': {}, } - ] + ], } - ] - } + ], + }, }, r''' line 5, column 17 of mono_repo.yaml: Unsupported value for "with". `withContent` cannot be defined unless `uses` is defined.` @@ -189,7 +189,7 @@ line 5, column 17 of mono_repo.yaml: Unsupported value for "with". `withContent` 'stages config only accepts a list', () => _testBadConfigWithYamlException( { - 'github': {'stages': 5} + 'github': {'stages': 5}, }, r''' line 2, column 11 of mono_repo.yaml: Unsupported value for "stages". `stages` must be an array. @@ -205,8 +205,8 @@ line 2, column 11 of mono_repo.yaml: Unsupported value for "stages". `stages` mu () => _testBadConfigWithYamlException( { 'github': { - 'stages': [5] - } + 'stages': [5], + }, }, r''' line 3, column 5 of mono_repo.yaml: Unsupported value for "stages". All values must be String or Map instances. @@ -222,8 +222,8 @@ line 3, column 5 of mono_repo.yaml: Unsupported value for "stages". All values m () => _testBadConfigWithUserException( { 'github': { - 'stages': ['missing'] - } + 'stages': ['missing'], + }, }, 'Error parsing mono_repo.yaml', expectedDetails: r''' @@ -240,9 +240,9 @@ One or more stage was referenced in `mono_repo.yaml` that do not exist in any `m { 'github': { 'stages': [ - {'name': 'foo', 'if': 1} + {'name': 'foo', 'if': 1}, ], - } + }, }, r''' line 4, column 11 of mono_repo.yaml: Unsupported value for "if". type 'int' is not a subtype of type 'String?' in type cast @@ -259,9 +259,9 @@ line 4, column 11 of mono_repo.yaml: Unsupported value for "if". type 'int' is n { 'github': { 'stages': [ - {'foo': 'bar'} + {'foo': 'bar'}, ], - } + }, }, r''' line 3, column 7 of mono_repo.yaml: Unrecognized keys: [foo]; supported keys: [name, if] @@ -280,7 +280,7 @@ void _testWorkflows() { 'must be a map', () => _testBadConfigWithYamlException( { - 'github': {'workflows': 'some value'} + 'github': {'workflows': 'some value'}, }, r''' line 2, column 14 of mono_repo.yaml: Unsupported value for "workflows". type 'String' is not a subtype of type 'Map?' in type cast @@ -296,8 +296,8 @@ line 2, column 14 of mono_repo.yaml: Unsupported value for "workflows". type 'St () => _testBadConfigWithYamlException( { 'github': { - 'workflows': {'bob': {}} - } + 'workflows': {'bob': {}}, + }, }, r''' line 3, column 10 of mono_repo.yaml: Required keys are missing: name, stages. @@ -318,9 +318,9 @@ line 3, column 10 of mono_repo.yaml: Required keys are missing: name, stages. 'name': 'bob', 'stages': ['bob'], 'extra': 42, - } - } - } + }, + }, + }, }, r''' line 7, column 7 of mono_repo.yaml: Unrecognized keys: [extra]; supported keys: [name, stages] diff --git a/mono_repo/test/mono_config_test.dart b/mono_repo/test/mono_config_test.dart index 9953f3e1..7edbd3aa 100644 --- a/mono_repo/test/mono_config_test.dart +++ b/mono_repo/test/mono_config_test.dart @@ -37,7 +37,7 @@ void main() { test('no stages - end up with one `unit_test` stage with one `test` task', () { final config = _parse({ - 'sdk': ['stable'] + 'sdk': ['stable'], }); final oneJob = config.jobs.single; @@ -74,9 +74,9 @@ void main() { { 'stages': [ { - 'format': ['dartfmt'] + 'format': ['dartfmt'], } - ] + ], }, r''' line 4, column 14: Each item within a stage must be a map. @@ -137,7 +137,7 @@ line 2, column 9: Unsupported value for "sdk". The value for "sdk" must be an ar 'sdk': ['stable'], 'stages': [ {'a': 42}, - ] + ], }; _expectParseThrows( @@ -158,7 +158,7 @@ line 7, column 9: Unsupported value for "a". Stages must be a list of maps with 'sdk': ['stable'], 'stages': [ {'a': 42}, - ] + ], }; _expectParseThrows( @@ -202,10 +202,10 @@ line 4, column 12: Unsupported value for "group". expected a list of tasks 'stages': [ { 'a': [ - {'weird': 'thing'} - ] + {'weird': 'thing'}, + ], }, - ] + ], }; _expectParseThrows( @@ -225,10 +225,10 @@ line 9, column 6: Must have one key of `format`, `analyze`, `test`, `command`, ` 'stages': [ { 'a': [ - {'test': 'thing', 'command': 'other thing'} - ] + {'test': 'thing', 'command': 'other thing'}, + ], }, - ] + ], }; _expectParseThrows( @@ -247,7 +247,7 @@ line 10, column 6: Must have one and only one key of `format`, `analyze`, `test` 'sdk': ['stable'], 'stages': [ {'a': []}, - ] + ], }; _expectParseThrows( monoYaml, @@ -265,7 +265,7 @@ line 7, column 9: Unsupported value for "a". Stages are required to have at leas 'sdk': ['stable'], 'stages': [ {'a': null, 'b': null}, - ] + ], }; _expectParseThrows( monoYaml, @@ -281,7 +281,7 @@ line 8, column 4: Stages must be a list of maps with exactly one key (the name o test('no keys under a stage', () { final monoYaml = { 'sdk': ['stable'], - 'stages': [{}] + 'stages': [{}], }; _expectParseThrows( monoYaml, @@ -299,7 +299,7 @@ line 6, column 3: Stages must be a list of maps with exactly one key (the name o 'sdk': ['stable'], 'stages': [ {'a': null}, - ] + ], }; _expectParseThrows( monoYaml, @@ -320,13 +320,13 @@ line 7, column 9: Unsupported value for "a". Stages are required to have at leas 'sdk': ['stable'], 'stages': [ { - 'a': ['test'] + 'a': ['test'], }, { - 'a': ['dartfmt'] + 'a': ['dartfmt'], }, ], - 'more': null + 'more': null, }; _expectParseThrows( monoYaml, @@ -344,12 +344,12 @@ line 2, column 2: Unrecognized keys: [extra, more]; supported keys: [os, sdk, st 'sdk': ['stable'], 'stages': [ { - 'a': ['test'] + 'a': ['test'], }, { - 'a': ['dartfmt'] + 'a': ['dartfmt'], }, - ] + ], }; _expectParseThrows( @@ -368,9 +368,9 @@ line 12, column 4: Stages must be unique. "a" appears more than once. 'sdk': ['latest'], 'stages': [ { - 'a': ['test'] + 'a': ['test'], }, - ] + ], }; _expectParseThrows(monoYaml, r''' @@ -428,11 +428,11 @@ List get _testConfig1expectedOutput => [ { 'flavor': 'dart', 'type': 'analyze', - 'args': '--fatal-infos --fatal-warnings .' + 'args': '--fatal-infos --fatal-warnings .', }, - {'flavor': 'dart', 'type': 'format'} + {'flavor': 'dart', 'type': 'format'}, ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'description': 'dartanalyzer && dartfmt', @@ -444,11 +444,11 @@ List get _testConfig1expectedOutput => [ { 'flavor': 'dart', 'type': 'analyze', - 'args': '--fatal-infos --fatal-warnings .' + 'args': '--fatal-infos --fatal-warnings .', }, - {'flavor': 'dart', 'type': 'format'} + {'flavor': 'dart', 'type': 'format'}, ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'os': 'osx', @@ -459,10 +459,10 @@ List get _testConfig1expectedOutput => [ { 'flavor': 'dart', 'type': 'analyze', - 'args': '--fatal-infos --fatal-warnings .' + 'args': '--fatal-infos --fatal-warnings .', } ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'os': 'linux', @@ -470,9 +470,9 @@ List get _testConfig1expectedOutput => [ 'sdk': '1.23.0', 'stageName': 'unit_test', 'tasks': [ - {'flavor': 'dart', 'type': 'test', 'args': '--platform chrome'} + {'flavor': 'dart', 'type': 'test', 'args': '--platform chrome'}, ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'os': 'linux', @@ -480,9 +480,9 @@ List get _testConfig1expectedOutput => [ 'sdk': 'dev', 'stageName': 'unit_test', 'tasks': [ - {'flavor': 'dart', 'type': 'test', 'args': '--platform chrome'} + {'flavor': 'dart', 'type': 'test', 'args': '--platform chrome'}, ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'os': 'linux', @@ -490,9 +490,9 @@ List get _testConfig1expectedOutput => [ 'sdk': 'stable', 'stageName': 'unit_test', 'tasks': [ - {'flavor': 'dart', 'type': 'test', 'args': '--platform chrome'} + {'flavor': 'dart', 'type': 'test', 'args': '--platform chrome'}, ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'os': 'linux', @@ -503,10 +503,10 @@ List get _testConfig1expectedOutput => [ { 'flavor': 'dart', 'type': 'test', - 'args': '--preset travis --total-shards 5 --shard-index 0' + 'args': '--preset travis --total-shards 5 --shard-index 0', } ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'os': 'linux', @@ -517,10 +517,10 @@ List get _testConfig1expectedOutput => [ { 'flavor': 'dart', 'type': 'test', - 'args': '--preset travis --total-shards 5 --shard-index 0' + 'args': '--preset travis --total-shards 5 --shard-index 0', } ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'os': 'linux', @@ -531,10 +531,10 @@ List get _testConfig1expectedOutput => [ { 'flavor': 'dart', 'type': 'test', - 'args': '--preset travis --total-shards 5 --shard-index 0' + 'args': '--preset travis --total-shards 5 --shard-index 0', } ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'os': 'linux', @@ -545,10 +545,10 @@ List get _testConfig1expectedOutput => [ { 'flavor': 'dart', 'type': 'test', - 'args': '--preset travis --total-shards 5 --shard-index 1' + 'args': '--preset travis --total-shards 5 --shard-index 1', } ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'os': 'linux', @@ -559,10 +559,10 @@ List get _testConfig1expectedOutput => [ { 'flavor': 'dart', 'type': 'test', - 'args': '--preset travis --total-shards 5 --shard-index 1' + 'args': '--preset travis --total-shards 5 --shard-index 1', } ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'os': 'linux', @@ -573,10 +573,10 @@ List get _testConfig1expectedOutput => [ { 'flavor': 'dart', 'type': 'test', - 'args': '--preset travis --total-shards 5 --shard-index 1' + 'args': '--preset travis --total-shards 5 --shard-index 1', } ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'os': 'linux', @@ -584,9 +584,9 @@ List get _testConfig1expectedOutput => [ 'sdk': '1.23.0', 'stageName': 'unit_test', 'tasks': [ - {'flavor': 'dart', 'type': 'test'} + {'flavor': 'dart', 'type': 'test'}, ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'os': 'linux', @@ -594,9 +594,9 @@ List get _testConfig1expectedOutput => [ 'sdk': 'dev', 'stageName': 'unit_test', 'tasks': [ - {'flavor': 'dart', 'type': 'test'} + {'flavor': 'dart', 'type': 'test'}, ], - 'flavor': 'dart' + 'flavor': 'dart', }, { 'os': 'linux', @@ -604,8 +604,8 @@ List get _testConfig1expectedOutput => [ 'sdk': 'stable', 'stageName': 'unit_test', 'tasks': [ - {'flavor': 'dart', 'type': 'test'} + {'flavor': 'dart', 'type': 'test'}, ], - 'flavor': 'dart' + 'flavor': 'dart', } ]; diff --git a/mono_repo/test/presubmit_command_test.dart b/mono_repo/test/presubmit_command_test.dart index 0916d962..f1c9fbc1 100644 --- a/mono_repo/test/presubmit_command_test.dart +++ b/mono_repo/test/presubmit_command_test.dart @@ -155,7 +155,7 @@ pkg_b 'presubmit', '--sdk=dev', '-p', - 'pkg_b' + 'pkg_b', ], workingDirectory: repoPath, ); @@ -184,7 +184,7 @@ pkg_b 'presubmit', '--sdk=dev', '-t', - 'format' + 'format', ], workingDirectory: repoPath, ); diff --git a/mono_repo/test/pub_command_test.dart b/mono_repo/test/pub_command_test.dart index 55850f81..986bd79f 100644 --- a/mono_repo/test/pub_command_test.dart +++ b/mono_repo/test/pub_command_test.dart @@ -28,6 +28,6 @@ environment: dependencies: meta: any -''') +'''), ]).create(); } diff --git a/mono_repo/test/readme_test.dart b/mono_repo/test/readme_test.dart index 5cf943f0..2fc27d71 100644 --- a/mono_repo/test/readme_test.dart +++ b/mono_repo/test/readme_test.dart @@ -35,7 +35,7 @@ void main() { name: sub_pkg environment: sdk: '>=2.17.0 <3.0.0' -''') +'''), ]).create(); testGenerateConfig( diff --git a/mono_repo/test/script_integration_test.dart b/mono_repo/test/script_integration_test.dart index ffd17a72..4f7c74aa 100644 --- a/mono_repo/test/script_integration_test.dart +++ b/mono_repo/test/script_integration_test.dart @@ -23,7 +23,7 @@ void main() { name: pkg_a environment: sdk: ">=2.12.0<3.0.0" - ''') + '''), ]).create(); await d.dir('pkg_b', [ @@ -38,7 +38,7 @@ environment: dependencies: not_a_package_at_all: any - ''') + '''), ]).create(); await d.dir('pkg_c', [ diff --git a/mono_repo/test/shared.dart b/mono_repo/test/shared.dart index 0b604a85..05e64bab 100644 --- a/mono_repo/test/shared.dart +++ b/mono_repo/test/shared.dart @@ -22,7 +22,7 @@ Future populateConfig(String monoRepoContent) async { d.file(monoPkgFileName, testConfig2), d.file('pubspec.yaml', ''' name: pkg_name - ''') + '''), ]).create(); } @@ -156,7 +156,7 @@ environment: dependencies: meta: any -''') +'''), ]).create(); await d.dir('pkg2_dir', [ @@ -170,7 +170,7 @@ environment: dependencies: meta: any -''') +'''), ]).create(); await d.dir('pkg3_dir', [ @@ -184,7 +184,7 @@ environment: dependencies: meta: any -''') +'''), ]).create(); await d.dir('pkg4_dir', [ @@ -197,6 +197,6 @@ environment: dependencies: meta: any -''') +'''), ]).create(); } diff --git a/mono_repo/test/yaml_write_test.dart b/mono_repo/test/yaml_write_test.dart index 4733ca41..1b48a8c7 100644 --- a/mono_repo/test/yaml_write_test.dart +++ b/mono_repo/test/yaml_write_test.dart @@ -34,7 +34,7 @@ curl -H "Content-Type: application/json" -X POST -d \ key: | curl -H "Content-Type: application/json" -X POST -d \ "{'text':'Build failed! ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}'}" \ - "${CHAT_WEBHOOK_URL}"''' + "${CHAT_WEBHOOK_URL}"''', }.entries) { _testRoundTrip({'key': entry.key}, expectedEncoding: entry.value); } @@ -63,7 +63,7 @@ key: | { 'on': { 'push': { - 'branches': [r'$default-branch'] + 'branches': [r'$default-branch'], }, 'pull_request': null, }, @@ -231,11 +231,11 @@ final _testItems = [ 'double': 3.14, 'string': 'string', 'list': [], - 'map': {} + 'map': {}, }, {null: 'null', true: 'bool', 1: 'int', 3.14: 'double', 'string': 'string'}, { - 'stages': [1, 2, 3] + 'stages': [1, 2, 3], }, {'list': []}, {'map': {}}, @@ -244,8 +244,8 @@ final _testItems = [ 'include': [ {'item1': 'value1', 'item2': 'value2'}, {'item1': 'value1', 'item2': 'value2'}, - ] - } + ], + }, }, // Lists @@ -254,7 +254,7 @@ final _testItems = [ [null, true, false, 1, 3.14, 'string', [], {}], [ {'test': 1}, - {'test': 2} + {'test': 2}, ] ]; @@ -267,7 +267,7 @@ const _stringEscapeSamples = [ 'vertical tab': '\v', 'form feed': '\r', 'carriage return': '\r', - 'delete': '\x7F' + 'delete': '\x7F', }, 'simple string', "'string with single quotes'", @@ -796,5 +796,5 @@ const _naughtyStrings = [ 'Roses are \x1B[0;31mred\x1B[0m, violets are \x1B[0;34mblue. Hope you enjoy terminal hue', 'But now...\x1B[20Cfor my greatest trick...\x1B[8m', 'The quic\b\b\b\b\b\bk brown fo\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07\x07x... [Beeeep]', - 'Powerلُلُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ冗' + 'Powerلُلُصّبُلُلصّبُررً ॣ ॣh ॣ ॣ冗', ];