Skip to content

Commit

Permalink
Remove explicit JSON dependency in favor of ordered preference list.
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Cox <henry.cox@mediatek.com>
  • Loading branch information
henry2cox committed Jan 6, 2025
1 parent 3cd2210 commit 5117611
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
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

0 comments on commit 5117611

Please sign in to comment.