mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-09-25 14:05:49 +02:00
ci: Validate VS filter files in buiild
msbuild does not use the project in it's entirety to build the app. This means problems can slip through, so an easy solution is just to ensure the XML is well-formed. More sophisticated validation could be done with something like `xmllint` but seems overkill.
This commit is contained in:
committed by
refractionpcsx2
parent
73b02c204b
commit
c4ca10258b
@@ -0,0 +1,19 @@
|
||||
$filterFiles = Get-ChildItem $PWD -name -recurse *.vcxproj.filters
|
||||
|
||||
$failed = $FALSE
|
||||
foreach ($file in $filterFiles) {
|
||||
# Skip 3rdparty files
|
||||
if ($file -NotMatch "^3rdparty") {
|
||||
$expression = "python -c `"import sys, xml.dom.minidom as d; d.parse(sys.argv[1])`" $($file)"
|
||||
$expression += ';$LastExitCode'
|
||||
$exitCode = Invoke-Expression $expression
|
||||
if($exitCode -ne 0){
|
||||
Write-Host -foregroundColor red "$($file) - Invalid VS filters file. Likely missing tags"
|
||||
$failed = $TRUE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($failed) {
|
||||
exit 1
|
||||
}
|
||||
Reference in New Issue
Block a user