<commit_before>$packageName = "mysettings-vscode"

Write-Output "Installing some VS Code extensions..."

if (-not (Test-Path "$env:USERPROFILE\.vscode\extensions")) {
    New-Item -Type Directory -Path "$env:USERPROFILE\.vscode\extensions" | Out-Null
}

if (-not (Test-Path "$env:APPDATA\Code\User")) {
    New-Item -Type Directory -Path "$env:APPDATA\Code\User" | Out-Null
}

$code = "C:\Program Files\Microsoft VS Code\bin\code.cmd"

Start-Process -FilePath $code -ArgumentList "--install-extension ms-vscode.csharp" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension PeterJausovec.vscode-docker" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension ms-python.python" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension msjsdiag.debugger-for-chrome" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension samverschueren.yo" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension rprouse.theme-obsidian" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension cake-build.cake-vscode" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension DotJoshJohnson.xml" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension EditorConfig.EditorConfig" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension eg2.tslint" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension haaaad.ansible" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension kisstkondoros.vscode-codemetrics" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension powershell.vscode-powershell" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension thomas-baumgaertner.vcl" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension eamodio.gitlens" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension ms-kubernetes-tools.vscode-kubernetes-tools" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension mkaufman.htmlhint" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension jebbs.plantuml" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension redhat.vscode-yaml" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension DavidAnson.vscode-markdownlint" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension ms-vscode.go" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension sonarsource.sonarlint-vscode" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension idleberg.vscode-nsis" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension marcostazi.vs-code-vagrantfile" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension dbaeumer.vscode-eslint" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension shardulm94.trailing-spaces" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension mauve.terraform" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension mkaufman.htmlhint" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension slevesque.vscode-autohotkey" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension robertohuertasm.vscode-icons" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension dbaeumer.jshint" -NoNewWindow -Wait
Start-Process -FilePath $code -ArgumentList "--install-extension shinnn.stylelint" -NoNewWindow -Wait


<commit_msg>Updated vscode to disable auto update and added some extensions<commit_after>Write-Output "Installing some VS Code extensions..."

if (-not (Test-Path "$env:USERPROFILE\.vscode\extensions")) {
    New-Item -Type Directory -Path "$env:USERPROFILE\.vscode\extensions" | Out-Null
}

if (-not (Test-Path "$env:APPDATA\Code\User")) {
    New-Item -Type Directory -Path "$env:APPDATA\Code\User" | Out-Null
}

$code = "C:\Program Files\Microsoft VS Code\bin\code.cmd"
$packages = @(
    "ms-vscode.csharp"
    "PeterJausovec.vscode-docker"
    "ms-python.python"
    "msjsdiag.debugger-for-chrome"
    "samverschueren.yo"
    "rprouse.theme-obsidian"
    "cake-build.cake-vscode"
    "DotJoshJohnson.xml"
    "EditorConfig.EditorConfig"
    "eg2.tslint"
    "haaaad.ansible"
    "kisstkondoros.vscode-codemetrics"
    "ms-vscode.powershell"
    "thomas-baumgaertner.vcl"
    "eamodio.gitlens"
    "ms-kubernetes-tools.vscode-kubernetes-tools"
    "mkaufman.htmlhint"
    "jebbs.plantuml"
    "redhat.vscode-yaml"
    "DavidAnson.vscode-markdownlint"
    "ms-vscode.go"
    "sonarsource.sonarlint-vscode"
    "idleberg.nsis"
    "marcostazi.vs-code-vagrantfile"
    "dbaeumer.vscode-eslint"
    "shardulm94.trailing-spaces"
    "mauve.terraform"
    "mkaufman.htmlhint"
    "slevesque.vscode-autohotkey"
    "robertohuertasm.vscode-icons"
    "dbaeumer.jshint"
    "shinnn.stylelint"
    "streetsidesoftware.code-spell-checker"
    "ms-vscode.jscs"
    "dbaeumer.jshint"
    "msazurermtools.azurerm-vscode-tools"
    "ms-mssql.mssql"
)

foreach ($package in $packages) {
    Start-Process -FilePath $code -ArgumentList "--install-extension $package" -NoNewWindow -Wait
}

# Disable Auto Update
$settingsFile = "$env:APPDATA\Code\User\settings.json"

if (-not (Test-Path $settingsFile)) {
    New-Item -ItemType File -Path $settingsFile | Out-Null

    $content = ConvertTo-Json @{
        "update.channel" = "none"
    }
} else {
    $content = ConvertFrom-Json -InputObject $(Get-Content $settingsFile -Encoding UTF8)

    try {
      $content."update.channel" = "none"
    } catch {
      $content | Add-Member -Name "update.channel" -value "none" -MemberType NoteProperty
    }

    $content = ConvertTo-Json $content -Depth 100
}

$content | Set-Content $settingsFile

{'fraction_non_alphanumeric': 0.1305830761734611, 'fraction_numerical': 0.001624167614097775, 'mean_word_length': 4.205409974640744, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3511593', 'n_tokens_mistral': 2035, 'n_tokens_neox': 1990, 'n_words': 426}