<commit_before>set CONFIGURATION=%1
set OUTPUT=%2

set OPENCOVER=.\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe
set TARGET=%VSINSTALLDIR%\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe
set TARGET_ARGS=.\ThScoreFileConverterTests\bin\%CONFIGURATION%\ThScoreFileConverterTests.dll
set FILTER=+[*]* -[ThScoreFileConverterTests]*

if /i "%APPVEYOR%" == "true" (
    set TARGET_ARGS=/logger:Appveyor %TARGET_ARGS%
)

%OPENCOVER% ^
    -register:user ^
    -target:"%TARGET%" ^
    -targetargs:"%TARGET_ARGS%" ^
    -filter:"%FILTER%" ^
    -output:"%OUTPUT%"
<commit_msg>Migrate to PowerShell to resolve the path of OpenCover.Console.exe<commit_after>[string]$configuration = $args[0]
[string]$output = $args[1]

$opencover = (Resolve-Path ".\packages\OpenCover.*\tools\OpenCover.Console.exe").ToString()
$target = "$env:VSINSTALLDIR\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
$targetArgs = ".\ThScoreFileConverterTests\bin\$configuration\ThScoreFileConverterTests.dll"
$filter = "+[*]* -[ThScoreFileConverterTests]*"

if ($env:APPVEYOR -ieq "true")
{
    $targetArgs = "/logger:Appveyor $targetArgs"
}

& $opencover `
    -register:user `
    -target:$target `
    -targetargs:$targetArgs `
    -filter:$filter `
    -output:$output

{'fraction_non_alphanumeric': 0.16304347826086957, 'fraction_numerical': 0.008540372670807454, 'mean_word_length': 5.287804878048781, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3982810', 'n_tokens_mistral': 472, 'n_tokens_neox': 440, 'n_words': 60}