mirror of
https://github.com/curl/curl.git
synced 2026-07-24 00:27:16 +03:00
GHA: add a checksrc job
This job unconditionally runs checksrc on ALL .c and .h files present in git. checksrc.pl: fixed to look for ".checksrc" in the same directory from where it loads the file to check so that it an be invoked like this Closes #14625
This commit is contained in:
parent
99ba50d9c4
commit
23749bfd04
2 changed files with 42 additions and 2 deletions
|
|
@ -115,9 +115,20 @@ sub readskiplist {
|
|||
# and since that's already handled via !checksrc! commands there is probably
|
||||
# little use to add it.
|
||||
sub readlocalfile {
|
||||
my ($file) = @_;
|
||||
my $i = 0;
|
||||
my $rcfile;
|
||||
|
||||
open(my $rcfile, "<", "$dir/.checksrc") or return;
|
||||
if(($dir eq ".") && $file =~ /\//) {
|
||||
my $ldir;
|
||||
if($file =~ /(.*)\//) {
|
||||
$ldir = $1;
|
||||
open($rcfile, "<", "$dir/$ldir/.checksrc") or return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
open($rcfile, "<", "$dir/.checksrc") or return;
|
||||
}
|
||||
|
||||
while(<$rcfile>) {
|
||||
$windows_os ? $_ =~ s/\r?\n$// : chomp;
|
||||
|
|
@ -264,7 +275,7 @@ if(!$file) {
|
|||
}
|
||||
|
||||
readskiplist();
|
||||
readlocalfile();
|
||||
readlocalfile($file);
|
||||
|
||||
do {
|
||||
if("$wlist" !~ / $file /) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue