From d95ad2795a06dc4a67b114258505a6e4257871ba Mon Sep 17 00:00:00 2001 From: Peter Csajtai Date: Tue, 28 Jan 2020 11:09:21 +0100 Subject: [PATCH] Fix wrong validation --- configcat/reference_validator/reference_validator.py | 7 +++---- setup.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/configcat/reference_validator/reference_validator.py b/configcat/reference_validator/reference_validator.py index 6e1bd46..639f705 100644 --- a/configcat/reference_validator/reference_validator.py +++ b/configcat/reference_validator/reference_validator.py @@ -14,9 +14,8 @@ def validate(remote_keys, missing_references = remote_keys.difference(reference_keys) missing_remote_keys = reference_keys.difference(remote_keys) - result = True - if len(missing_references) > 0 or len(missing_references) > 0: - result = False + is_failed = len(missing_references) > 0 or len(missing_remote_keys) > 0 + if is_failed: log.warning("Found unused feature flags!") if len(missing_references) > 0: @@ -33,4 +32,4 @@ def validate(remote_keys, for item in missing_remote_keys: log.warning("Clean up '%s' from code.", item) - return result + return not is_failed diff --git a/setup.py b/setup.py index b6c06d0..784e727 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ import setuptools -version = "1.0.9" +version = "1.1.0" setuptools.setup( name='configcat-flag-reference-validator',