Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove explicit JSON dependency in favor of ordered preference list. #374

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions scripts/criteria
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ use FindBin;
use Getopt::Long;
use lib "$FindBin::RealBin";
use criteria qw(new);
use JSON;

use lib "$FindBin::RealBin/../lib";
use lib "$FindBin::RealBin/../../../lib"; # path from 'support-scripts'

use lcovutil;

my $obj = criteria->new($0, @ARGV);

Expand All @@ -54,7 +58,7 @@ if (!defined($obj) ||
return undef;
}
my $json = pop(@ARGV);
my $db = decode_json($json);
my $db = JsonSupport::decode($json);

my ($status, $msgs) = $obj->check_criteria(@ARGV, $db);
foreach my $m (@$msgs) {
Expand Down
1 change: 0 additions & 1 deletion scripts/criteria.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
package criteria;

use strict;
use JSON;
use Getopt::Long qw(GetOptionsFromArray);

our @ISA = qw(Exporter);
Expand Down
1 change: 0 additions & 1 deletion scripts/threshold.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
package threshold;

use strict;
use JSON;
use Getopt::Long qw(GetOptionsFromArray);
use Scalar::Util qw/looks_like_number/;

Expand Down