Skip to content

Commit

Permalink
Fix wrong validation
Browse files Browse the repository at this point in the history
  • Loading branch information
z4kn4fein committed Jan 28, 2020
1 parent bdfae49 commit d95ad27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions configcat/reference_validator/reference_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import setuptools

version = "1.0.9"
version = "1.1.0"

setuptools.setup(
name='configcat-flag-reference-validator',
Expand Down

0 comments on commit d95ad27

Please sign in to comment.