tests: validate developer bash commands
tests: validate developer bash commands

Also change the logic a bit to iterate over the individual files per
directory, as having a directory without bash commands will otherwise
pass a literal `*.sh` to `bash -n`, causing it to fail.

Closes #48323.

Signed-off-by: Martin Afanasjew <54669547a225ff20cba8b75a4adca540eef25858@afanasjew.de>

quantumsteve/homebrew,drbenmorgan/linuxbrew,drewwells/homebrew,base10/homebrew,Homebrew/homebrew,apjanke/homebrew,Homebrew/linuxbrew,influxdb/homebrew,brunchboy/homebrew,vigo/homebrew,ralic/homebrew,muellermartin/homebrew,hakamadare/homebrew,dplarson/homebrew,reelsense/linuxbrew,scorphus/homebrew,MartinDelille/homebrew,jamer/homebrew,cscetbon/homebrew,brunchboy/homebrew,osimola/homebrew,saketkc/linuxbrew,dunn/homebrew,SuperNEMO-DBD/cadfaelbrew,kenips/homebrew,skatsuta/homebrew,Homebrew/homebrew,esamson/homebrew,Angeldude/linuxbrew,esamson/homebrew,deorth/homebrew,bukzor/linuxbrew,AlexejK/homebrew,cprecioso/homebrew,scpeters/homebrew,haihappen/homebrew,Asuranceturix/homebrew,joshfriend/homebrew,dalanmiller/homebrew,optikfluffel/homebrew,yazuuchi/homebrew,SteveClement/homebrew,optikfluffel/homebrew,polishgeeks/homebrew,ear/homebrew,dongcarl/homebrew,hakamadare/homebrew,bigbes/homebrew,3van/homebrew,elyscape/homebrew,vigo/homebrew,cscetbon/homebrew,LinusU/homebrew,josa42/homebrew,iostat/homebrew2,dplarson/homebrew,vigo/homebrew,reelsense/homebrew,alebcay/homebrew,reelsense/linuxbrew,youtux/homebrew,frodeaa/homebrew,cosmo0920/homebrew,ralic/homebrew,dericed/homebrew,Linuxbrew/linuxbrew,Angeldude/linuxbrew,slyphon/homebrew,ExtremeMan/homebrew,dutchcoders/homebrew,esamson/homebrew,nandub/homebrew,dutchcoders/homebrew,tschoonj/homebrew,kevinastone/homebrew,scpeters/homebrew,liamstask/homebrew,jamer/homebrew,benjaminfrank/homebrew,bukzor/linuxbrew,base10/homebrew,redpen-cc/homebrew,pcottle/homebrew,drewwells/homebrew,ear/homebrew,recruit-tech/homebrew,slyphon/homebrew,sferik/homebrew,quantumsteve/homebrew,gawbul/homebrew,treyharris/homebrew,vigo/homebrew,emcrisostomo/homebrew,jamer/homebrew,theeternalsw0rd/homebrew,pcottle/homebrew,MartinDelille/homebrew,Linuxbrew/linuxbrew,eighthave/homebrew,hongkongkiwi/homebrew,drbenmorgan/linuxbrew,johanhammar/homebrew,dunn/homebrew,Homebrew/linuxbrew,TaylorMonacelli/homebrew,ebouaziz/linuxbrew,sometimesfood/homebrew,kodabb/homebrew,OJFord/homebrew,josa42/homebrew,ybott/homebrew,dickeyxxx/homebrew,LinusU/homebrew,keith/homebrew,frodeaa/homebrew,MartinDelille/homebrew,mkrapp/homebrew,benjaminfrank/homebrew,kevinastone/homebrew,ryanfb/homebrew,gnubila-france/linuxbrew,kodabb/homebrew,mkrapp/homebrew,marcwebbie/homebrew,BrewTestBot/homebrew,bigbes/homebrew,DoomHammer/linuxbrew,influxdb/homebrew,esamson/homebrew,yazuuchi/homebrew,marcwebbie/homebrew,Homebrew/linuxbrew,sjackman/linuxbrew,osimola/homebrew,elgertam/homebrew,scpeters/homebrew,3van/homebrew,filcab/homebrew,reelsense/homebrew,redpen-cc/homebrew,bukzor/linuxbrew,Chilledheart/homebrew,gicmo/homebrew,keith/homebrew,nandub/homebrew,getgauge/homebrew,3van/homebrew,tschoonj/homebrew,kodabb/homebrew,filcab/homebrew,Asuranceturix/homebrew,booi/homebrew,cprecioso/homebrew,marcwebbie/homebrew,skinny-framework/homebrew,kenips/homebrew,Homebrew/homebrew,totalvoidness/homebrew,booi/homebrew,totalvoidness/homebrew,ryanfb/homebrew,dericed/homebrew,hakamadare/homebrew,ralic/homebrew,hongkongkiwi/homebrew,influxdata/homebrew,youtux/homebrew,drewwells/homebrew,ablyler/homebrew,yumitsu/homebrew,ablyler/homebrew,mobileoverlord/homebrew-1,decors/homebrew,johanhammar/homebrew,chadcatlett/homebrew,treyharris/homebrew,Asuranceturix/homebrew,yumitsu/homebrew,totalvoidness/homebrew,base10/homebrew,hanxue/homebrew,totalvoidness/homebrew,retrography/homebrew,LinusU/homebrew,LinusU/homebrew,reelsense/linuxbrew,ybott/homebrew,johanhammar/homebrew,reelsense/homebrew,saketkc/linuxbrew,thinker0/homebrew,cosmo0920/homebrew,influxdata/homebrew,getgauge/homebrew,ExtremeMan/homebrew,haihappen/homebrew,TaylorMonacelli/homebrew,dongcarl/homebrew,iostat/homebrew2,MartinDelille/homebrew,OJFord/homebrew,sometimesfood/homebrew,benjaminfrank/homebrew,sferik/homebrew,royhodgman/homebrew,hongkongkiwi/homebrew,afh/homebrew,reelsense/homebrew,dalanmiller/homebrew,jamer/homebrew,youtux/homebrew,SteveClement/homebrew,royhodgman/homebrew,menivaitsi/homebrew,Homebrew/linuxbrew,ebouaziz/linuxbrew,mkrapp/homebrew,treyharris/homebrew,getgauge/homebrew,hanxue/homebrew,galaxy001/homebrew,yazuuchi/homebrew,osimola/homebrew,dutchcoders/homebrew,elyscape/homebrew,afh/homebrew,osimola/homebrew,kenips/homebrew,optikfluffel/homebrew,elgertam/homebrew,ExtremeMan/homebrew,quantumsteve/homebrew,thinker0/homebrew,theeternalsw0rd/homebrew,BrewTestBot/homebrew,chadcatlett/homebrew,georgschoelly/homebrew,polishgeeks/homebrew,ablyler/homebrew,frodeaa/homebrew,gicmo/homebrew,redpen-cc/homebrew,alebcay/homebrew,filcab/homebrew,ybott/homebrew,ear/homebrew,drbenmorgan/linuxbrew,slyphon/homebrew,bigbes/homebrew,tschoonj/homebrew,marcwebbie/homebrew,TaylorMonacelli/homebrew,retrography/homebrew,ear/homebrew,youtux/homebrew,scpeters/homebrew,utzig/homebrew,theeternalsw0rd/homebrew,nandub/homebrew,Angeldude/linuxbrew,tutumcloud/homebrew,liamstask/homebrew,dickeyxxx/homebrew,optikfluffel/homebrew,skinny-framework/homebrew,retrography/homebrew,cprecioso/homebrew,tutumcloud/homebrew,lrascao/homebrew,filcab/homebrew,brunchboy/homebrew,retrography/homebrew,Linuxbrew/linuxbrew,muellermartin/homebrew,dickeyxxx/homebrew,Red54/homebrew,Chilledheart/homebrew,sjackman/linuxbrew,eighthave/homebrew,liamstask/homebrew,apjanke/homebrew,treyharris/homebrew,ralic/homebrew,chadcatlett/homebrew,menivaitsi/homebrew,dongcarl/homebrew,sakra/homebrew,utzig/homebrew,ebouaziz/linuxbrew,slyphon/homebrew,sferik/homebrew,Linuxbrew/linuxbrew,afh/homebrew,alebcay/homebrew,joshfriend/homebrew,lrascao/homebrew,Asuranceturix/homebrew,dericed/homebrew,alebcay/homebrew,drewwells/homebrew,elyscape/homebrew,cosmo0920/homebrew,mobileoverlord/homebrew-1,AlexejK/homebrew,DoomHammer/linuxbrew,skatsuta/homebrew,apjanke/homebrew,recruit-tech/homebrew,decors/homebrew,gawbul/homebrew,skatsuta/homebrew,Angeldude/linuxbrew,theeternalsw0rd/homebrew,lrascao/homebrew,eighthave/homebrew,DoomHammer/linuxbrew,ilovezfs/homebrew,muellermartin/homebrew,scorphus/homebrew,galaxy001/homebrew,SteveClement/homebrew,mobileoverlord/homebrew-1,tutumcloud/homebrew,OJFord/homebrew,Homebrew/homebrew,tschoonj/homebrew,ebouaziz/linuxbrew,sakra/homebrew,galaxy001/homebrew,haihappen/homebrew,SuperNEMO-DBD/cadfaelbrew,dplarson/homebrew,ilovezfs/homebrew,dalanmiller/homebrew,sakra/homebrew,sjackman/linuxbrew,georgschoelly/homebrew,SuperNEMO-DBD/cadfaelbrew,SuperNEMO-DBD/cadfaelbrew,iostat/homebrew2,michaKFromParis/homebrew-sparks,emcrisostomo/homebrew,elyscape/homebrew,deorth/homebrew,Red54/homebrew,gicmo/homebrew,michaKFromParis/homebrew-sparks,Red54/homebrew,dalanmiller/homebrew,kevinastone/homebrew,brunchboy/homebrew,base10/homebrew,kodabb/homebrew,reelsense/linuxbrew,sakra/homebrew,royhodgman/homebrew,apjanke/homebrew,benjaminfrank/homebrew,menivaitsi/homebrew,dutchcoders/homebrew,thinker0/homebrew,cprecioso/homebrew,BrewTestBot/homebrew,emcrisostomo/homebrew,recruit-tech/homebrew,eighthave/homebrew,OJFord/homebrew,DoomHammer/linuxbrew,booi/homebrew,ryanfb/homebrew,sometimesfood/homebrew,influxdb/homebrew,skatsuta/homebrew,saketkc/linuxbrew,galaxy001/homebrew,pcottle/homebrew,skinny-framework/homebrew,kevinastone/homebrew,quantumsteve/homebrew,polishgeeks/homebrew,bigbes/homebrew,influxdata/homebrew,emcrisostomo/homebrew,michaKFromParis/homebrew-sparks,josa42/homebrew,influxdb/homebrew,nandub/homebrew,polishgeeks/homebrew,keith/homebrew,kenips/homebrew,dunn/homebrew,recruit-tech/homebrew,scorphus/homebrew,dunn/homebrew,skinny-framework/homebrew,ryanfb/homebrew,hongkongkiwi/homebrew,mobileoverlord/homebrew-1,cscetbon/homebrew,elgertam/homebrew,dplarson/homebrew,afh/homebrew,ablyler/homebrew,Asuranceturix/homebrew,hanxue/homebrew,cosmo0920/homebrew,getgauge/homebrew,keith/homebrew,ilovezfs/homebrew,frodeaa/homebrew,SteveClement/homebrew,drbenmorgan/linuxbrew,menivaitsi/homebrew,sometimesfood/homebrew,yumitsu/homebrew,gawbul/homebrew,deorth/homebrew,utzig/homebrew,ybott/homebrew,pcottle/homebrew,ExtremeMan/homebrew,Red54/homebrew,saketkc/linuxbrew,gnubila-france/linuxbrew,influxdata/homebrew,scorphus/homebrew,bukzor/linuxbrew,royhodgman/homebrew,dongcarl/homebrew,joshfriend/homebrew,haihappen/homebrew,redpen-cc/homebrew,johanhammar/homebrew,muellermartin/homebrew,hanxue/homebrew,utzig/homebrew,elgertam/homebrew,yazuuchi/homebrew,sjackman/linuxbrew,ilovezfs/homebrew,AlexejK/homebrew,gnubila-france/linuxbrew,georgschoelly/homebrew,3van/homebrew,decors/homebrew,decors/homebrew,hakamadare/homebrew,georgschoelly/homebrew,BrewTestBot/homebrew,AlexejK/homebrew,SteveClement/homebrew,gicmo/homebrew,tutumcloud/homebrew,gnubila-france/linuxbrew,dickeyxxx/homebrew,thinker0/homebrew,liamstask/homebrew,Chilledheart/homebrew,TaylorMonacelli/homebrew,iostat/homebrew2,pcottle/homebrew,Chilledheart/homebrew,sferik/homebrew,dericed/homebrew