mirror of
https://github.com/sickn33/antigravity-awesome-skills.git
synced 2026-04-25 17:25:12 +02:00
test: allow known Microsoft skills collision
This commit is contained in:
@@ -16,6 +16,12 @@ from pathlib import Path
|
||||
from collections import defaultdict
|
||||
|
||||
MS_REPO = "https://github.com/microsoft/skills.git"
|
||||
KNOWN_UPSTREAM_COLLISIONS = {
|
||||
"applicationinsights-web-ts": {
|
||||
".github/plugins/azure-sdk-typescript/skills/applicationinsights-web-ts",
|
||||
".github/skills/applicationinsights-web-ts",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def create_clone_target(prefix: str) -> Path:
|
||||
@@ -154,8 +160,16 @@ def analyze_skill_locations():
|
||||
name_map[name].append(str(rel))
|
||||
|
||||
# Report results
|
||||
collisions = {n: paths for n, paths in name_map.items()
|
||||
if len(paths) > 1}
|
||||
raw_collisions = {n: paths for n, paths in name_map.items()
|
||||
if len(paths) > 1}
|
||||
collisions = {}
|
||||
ignored_collisions = {}
|
||||
for name, paths in raw_collisions.items():
|
||||
path_set = set(paths)
|
||||
if KNOWN_UPSTREAM_COLLISIONS.get(name) == path_set:
|
||||
ignored_collisions[name] = paths
|
||||
else:
|
||||
collisions[name] = paths
|
||||
unique_names = {n: paths for n,
|
||||
paths in name_map.items() if len(paths) == 1}
|
||||
|
||||
@@ -178,6 +192,13 @@ def analyze_skill_locations():
|
||||
else:
|
||||
print(f"\n ✅ No collisions detected!")
|
||||
|
||||
if ignored_collisions:
|
||||
print(f"\n ⚠️ Ignored known upstream collisions ({len(ignored_collisions)}):")
|
||||
for name, paths in ignored_collisions.items():
|
||||
print(f" '{name}':")
|
||||
for p in paths:
|
||||
print(f" - {p}")
|
||||
|
||||
# Validate all names are valid directory names
|
||||
print("\n5️⃣ Directory Name Validation:")
|
||||
invalid_names = []
|
||||
@@ -201,6 +222,7 @@ def analyze_skill_locations():
|
||||
print(f" Total SKILL.md files: {total}")
|
||||
print(f" Unique flat names: {len(unique_names)}")
|
||||
print(f" Collisions: {len(collisions)}")
|
||||
print(f" Ignored upstream collisions: {len(ignored_collisions)}")
|
||||
print(f" Missing names: {len(missing_names)}")
|
||||
|
||||
is_pass = len(collisions) == 0 and len(invalid_names) == 0
|
||||
@@ -215,6 +237,7 @@ def analyze_skill_locations():
|
||||
"total": total,
|
||||
"unique": len(unique_names),
|
||||
"collisions": len(collisions),
|
||||
"ignored_collisions": len(ignored_collisions),
|
||||
"missing_names": len(missing_names),
|
||||
"invalid_names": len(invalid_names),
|
||||
"passed": is_pass,
|
||||
|
||||
Reference in New Issue
Block a user