Skip to content

Commit

Permalink
Fix wrong messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
z4kn4fein committed Jan 28, 2020
1 parent 2015821 commit ab42f49
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion configcat-validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def main():
sys.exit(1)

if validation_result:
log.info("PASSED. everything's fine, didn't find any unused feature flags.")
log.info("PASSED. Everything's fine, didn't find any unused feature flags.")


def str2bool(v):
Expand Down
9 changes: 4 additions & 5 deletions configcat/reference_validator/reference_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@ def validate(remote_keys,
missing_references = remote_keys.difference(reference_keys)
missing_remote_keys = reference_keys.difference(remote_keys)

log.warning(
"Found unused feature flags!")

result = True
if len(missing_references) > 0:
if len(missing_references) > 0 or len(missing_references) > 0:
result = False
log.warning("Found unused feature flags!")

if len(missing_references) > 0:
log.debug(
"Feature flag/Setting keys not found in source code (but present in ConfigCat): %s.",
missing_references)
for item in missing_references:
log.warning("Clean up '%s' from ConfigCat Dashboard.", item)

if len(missing_remote_keys) > 0:
result = False
log.debug(
"Feature flag/Setting keys not found in ConfigCat (but present in source code): %s.",
missing_remote_keys)
Expand Down
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.8"
version = "1.0.9"

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

0 comments on commit ab42f49

Please sign in to comment.