diff --git a/rocrate_validator/cli/commands/validate.py b/rocrate_validator/cli/commands/validate.py index f5b88511..2bc4a31d 100644 --- a/rocrate_validator/cli/commands/validate.py +++ b/rocrate_validator/cli/commands/validate.py @@ -817,7 +817,7 @@ def __compute_profile_stats__(validation_settings: dict): # count the checks num_checks = len( [_ for _ in requirement.get_checks_by_level(LevelCollection.get(severity.name)) - if not _.overridden or _.requirement.profile == profile]) + if not _.overridden]) check_count_by_severity[severity] += num_checks requirement_checks_count += num_checks diff --git a/tests/unit/test_cli_internals.py b/tests/unit/test_cli_internals.py index 19c45517..f65f5ba9 100644 --- a/tests/unit/test_cli_internals.py +++ b/tests/unit/test_cli_internals.py @@ -74,6 +74,6 @@ def test_compute_stats(fake_profiles_path): assert len(requirement.get_checks()) == len(requirement.get_checks_by_level(LevelCollection.get("REQUIRED"))) # check the number of requirement checks - assert stats["total_checks"] == len(requirements[0].get_checks()) + assert stats["total_checks"] == len([_ for _ in requirements[0].get_checks() if not _.overridden]) logger.error(stats)