Skip to content

Commit

Permalink
Swap logic
Browse files Browse the repository at this point in the history
  • Loading branch information
elesel committed Jul 6, 2023
1 parent 0d6462e commit 883b700
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions scripts/azureml-assets/azureml/assets/validate_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,10 @@ def validate_assets(input_dirs: List[Path],
if validate_this:
# Validate name
if check_names:
print(f"Checking {asset_config.full_name}")
if check_names_skip_pattern is not None and check_names_skip_pattern.fullmatch(asset_config.full_name):
logger.log_debug(f"Skipping name validation for {asset_config.full_name}")
else:
if check_names_skip_pattern is None or not check_names_skip_pattern.fullmatch(asset_config.full_name):
error_count += validate_name(asset_config)
else:
logger.log_debug(f"Skipping name validation for {asset_config.full_name}")

# Validate categories
if check_categories:
Expand Down

0 comments on commit 883b700

Please sign in to comment.