feat: implement analyzer and code fixer for identifying and fixing when a sync flag is not propagated correctly.

This commit is contained in:
Stevan Freeborn
2026-06-18 21:28:41 -05:00
parent 86b9673b24
commit f3da2f60fd
45 changed files with 2184 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
version="${1:-}"
csprojPath="${2:-src/StevanFreeborn.AsyncSyncFlagAnalyzer/StevanFreeborn.AsyncSyncFlagAnalyzer.csproj}"
if [[ -z "$version" ]]; then
echo "Error: Version is required"
exit 1
fi
content=$(cat "$csprojPath")
if [[ "$content" =~ \<Version\>.*?\</Version\> ]]; then
content=$(echo "$content" | sed "s|<Version>.*</Version>|<Version>$version</Version>|")
elif [[ "$content" =~ \<PropertyGroup\> ]]; then
content=$(echo "$content" | sed "s|<PropertyGroup>|<PropertyGroup>\\n <Version>$version</Version>|")
fi
echo "$content" > "$csprojPath"