Opened 7 years ago

Closed 5 years ago

#4777 closed defect (fixed)

checkrefs script needs update for biome files

Reported by: fatherbushido Owned by: Stan
Priority: Should Have Milestone: Alpha 24
Component: Maps Keywords:
Cc: Patch: https://code.wildfiregames.com/D1381

Description

Not critical but having verification script displaying errors makes me anxious.

Despite the special templates error, there is a new one (I guess it's just a false positive).

Loading random maps...
Use of uninitialized value in concatenation (.) or string at checkrefs.pl line 444.
Loading terrains...

Missing file 'art/textures/ui/session/portraits/' referenced by: 'public/simulation/templates/special_filter/mirage.xml'
Missing file 'maps/random/' referenced by: 'public/maps/random/rmbiome/biomes/alpine.json', 'public/maps/random/rmbiome/biomes/autumn.json', 'public/maps/random/rmbiome/biomes/desert.json', 'public/maps/random/rmbiome/biomes/mediterranean.json', 'public/maps/random/rmbiome/biomes/savanna.json', 'public/maps/random/rmbiome/biomes/snowy.json', 'public/maps/random/rmbiome/biomes/temperate.json', 'public/maps/random/rmbiome/biomes/tropic.json', 'public/maps/random/rmbiome/defaultbiome.json'

(One should think to make the warn about duplicated things optional and include that on phab to prevent artist mistake and to incentive dev to keep it updated and to not break it more than it is (if it is).)

Change History (6)

comment:1 by elexis, 7 years ago

Milestone: BacklogAlpha 23
Patch: rfc
diff --git a/source/tools/entity/checkrefs.pl b/source/tools/entity/checkrefs.pl
index aaa482d..770e4df 100755
--- a/source/tools/entity/checkrefs.pl
+++ b/source/tools/entity/checkrefs.pl
@@ -103,7 +103,7 @@ sub add_entities
 
             if ($ent->{Entity}{Identity})
             {
-                push @deps, [ $path, "art/textures/ui/session/portraits/" . $ent->{Entity}{Identity}{Icon}{' content'} ] if $ent->{Entity}{Identity}{Icon};
+                push @deps, [ $path, "art/textures/ui/session/portraits/" . $ent->{Entity}{Identity}{Icon}{' content'} ] if $ent->{Entity}{Identity}{Icon} and $ent->{Entity}{Identity}{Icon}{' content'} ne '';
             }
         }
     }
@@ -435,6 +435,11 @@ sub add_rms
 
     for my $f (sort @rmsdefs)
     {
+       if ($f =~ /^maps\/random\/rmbiome/)
+       {
+               next;
+       }
+
         push @files, $f;
 
         push @roots, $f;

One could add a function to load the biomes and test that all textures and templates referenced there actually exist.

Could also load the trigger scripts from the map json files to nuke some unused false positives. Possible to load rando maps and mark the loaded rmgen libraries as used to nuke further false positives. Dunno about the other hundreds of false positive unused messages.

comment:2 by elexis, 7 years ago

Summary: checkrefs script needs one more updatecheckrefs script needs update for biome files

comment:3 by fatherbushido, 7 years ago

(unused things are not really false positive) refs D924, but anyway unrelated to that ticket.

comment:4 by fatherbushido, 7 years ago

(refs #4560)

comment:5 by Stan, 6 years ago

Milestone: Alpha 23Alpha 24
Owner: set to Stan
Patch: rfchttps://code.wildfiregames.com/D1381

I'll see if I can fix for A24. This is a great tool.

comment:6 by Stan, 5 years ago

Resolution: fixed
Status: newclosed

fixed in r22096

Note: See TracTickets for help on using tickets.