Explorar el Código

Ignore `package runtime` with using `-vet-unused-packages`

gingerBill hace 11 meses
padre
commit
aeb568f79a
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/checker.cpp

+ 3 - 0
src/checker.cpp

@@ -695,6 +695,9 @@ gb_internal void check_scope_usage_internal(Checker *c, Scope *scope, u64 vet_fl
 		bool vet_unused = (vet_flags & VetFlag_Unused) != 0;
 		bool vet_shadowing = (vet_flags & (VetFlag_Shadowing|VetFlag_Using)) != 0;
 		bool vet_unused_procedures = (vet_flags & VetFlag_UnusedProcedures) != 0;
+		if (vet_unused_procedures && e->pkg && e->pkg->kind == Package_Runtime) {
+			vet_unused_procedures = false;
+		}
 
 		VettedEntity ve_unused = {};
 		VettedEntity ve_shadowed = {};