File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1212 exit ( 1 );
1313}
1414
15+ $ ExitWithError = false ;
16+
1517foreach ( $ Rulesets as $ Type => $ Rules )
1618{
1719 foreach ( $ Rules as $ Name => $ RuleRegexes )
6264
6365 if ( getenv ( 'CI ' ) !== false )
6466 {
65- echo "::notice file= {$ File }::Updated {$ Type }. {$ Name } (please run GenerateTestStrings and commit it) \n" ;
67+ $ ExitWithError = true ;
68+ $ NewContents = implode ( '%0A ' , $ Tests );
69+ echo "::warning file= {$ File }::Updated {$ Type }. {$ Name } (please run GenerateTestStrings and commit it)%0ANew file contents:%0A {$ NewContents }" ;
6670 }
6771 else
6872 {
7478echo "Now running tests... \n" ;
7579require __DIR__ . '/Test.php ' ;
7680
81+ if ( $ ExitWithError )
82+ {
83+ exit ( 1 );
84+ }
85+
7786/**
7887 * Native PHP regex pattern generator
7988 * Generates ALL possible variations from regex patterns with smart bounds for infinite cases
You can’t perform that action at this time.
0 commit comments