@@ -113,6 +113,13 @@ dev_dependencies:
113113''' ;
114114 }
115115
116+ String falseSecretsSection () {
117+ return '''
118+ false_secrets:
119+ - /lib/main.dart
120+ ''' ;
121+ }
122+
116123 test ('passes for a plugin following conventions' , () async {
117124 final Directory pluginDirectory = createFakePlugin ('plugin' , packagesDir);
118125
@@ -122,6 +129,7 @@ ${environmentSection()}
122129${flutterSection (isPlugin : true )}
123130${dependenciesSection ()}
124131${devDependenciesSection ()}
132+ ${falseSecretsSection ()}
125133''' );
126134
127135 final List <String > output = await runCapturingPrint (runner, < String > [
@@ -147,6 +155,7 @@ ${environmentSection()}
147155${dependenciesSection ()}
148156${devDependenciesSection ()}
149157${flutterSection ()}
158+ ${falseSecretsSection ()}
150159''' );
151160
152161 final List <String > output = await runCapturingPrint (runner, < String > [
@@ -399,7 +408,7 @@ ${dependenciesSection()}
399408 );
400409 });
401410
402- test ('fails when devDependencies section is out of order' , () async {
411+ test ('fails when dev_dependencies section is out of order' , () async {
403412 final Directory pluginDirectory = createFakePlugin ('plugin' , packagesDir);
404413
405414 pluginDirectory.childFile ('pubspec.yaml' ).writeAsStringSync ('''
@@ -426,6 +435,34 @@ ${dependenciesSection()}
426435 );
427436 });
428437
438+ test ('fails when false_secrets section is out of order' , () async {
439+ final Directory pluginDirectory = createFakePlugin ('plugin' , packagesDir);
440+
441+ pluginDirectory.childFile ('pubspec.yaml' ).writeAsStringSync ('''
442+ ${headerSection ('plugin' , isPlugin : true )}
443+ ${environmentSection ()}
444+ ${flutterSection (isPlugin : true )}
445+ ${dependenciesSection ()}
446+ ${falseSecretsSection ()}
447+ ${devDependenciesSection ()}
448+ ''' );
449+
450+ Error ? commandError;
451+ final List <String > output = await runCapturingPrint (
452+ runner, < String > ['pubspec-check' ], errorHandler: (Error e) {
453+ commandError = e;
454+ });
455+
456+ expect (commandError, isA <ToolExit >());
457+ expect (
458+ output,
459+ containsAllInOrder (< Matcher > [
460+ contains (
461+ 'Major sections should follow standard repository ordering:' ),
462+ ]),
463+ );
464+ });
465+
429466 test ('fails when an implemenation package is missing "implements"' ,
430467 () async {
431468 final Directory pluginDirectory = createFakePlugin (
0 commit comments