Skip to content

Conversation

@dilanbhalla
Copy link

@dilanbhalla dilanbhalla commented Nov 3, 2025

  • tested extraction and tests locally (most tests pass, handful of failures probably worth further investigation/debugging)
  • attempted to update pipelines to build/test for windows as well

Copilot AI review requested due to automatic review settings November 3, 2025 05:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Windows support to the CodeQL IAC extractor by creating PowerShell equivalents of existing bash scripts and enabling Windows in CI/CD workflows.

  • Adds PowerShell scripts for Windows: create-extractor-pack.ps1, run-tests.ps1, and install-extractor.ps1
  • Updates CI/CD workflows to include Windows platform in the build matrix
  • Updates extractor configuration to support additional file extensions (.tfvars, .bicep) and changes language identifier from "hcl" to "iac"

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/qltest.cmd Added .tfvars and .bicep file extensions; changed language from "hcl" to "iac"
tools/index-files.cmd Added "extract" subcommand to extractor invocation
scripts/run-tests.ps1 New PowerShell script for running tests on Windows
scripts/install-extractor.ps1 New PowerShell script for installing extractor on Windows
scripts/create-extractor-pack.ps1 Rewritten PowerShell script with improved structure and error handling
.github/workflows/publish.yml Added Windows to build matrix and fixed typo in "Download"
.github/workflows/build.yml Added Windows to test matrix with platform-specific build and test steps
Comments suppressed due to low confidence (1)

.github/workflows/build.yml:63

  • Corrected spelling of 'extensions' to 'extension'. The command should be 'gh extension install' not 'gh extensions install'.
          gh extensions install github/gh-codeql

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

codeql query format -i ql\src\codeql_ql\ast\internal\TreeSitter.qll
# Check for CodeQL binary
if (Get-Command "codeql" -ErrorAction SilentlyContinue) {
$CODEQL_BINARY = "codeql"
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: Line 8 uses tabs while most other lines in the file use spaces. This line should use spaces to match the rest of the file's indentation style.

Suggested change
$CODEQL_BINARY = "codeql"
$CODEQL_BINARY = "codeql"

Copilot uses AI. Check for mistakes.
gh codeql version 2>&1 | Out-Null
$CODEQL_BINARY = "gh codeql"
}
catch {
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: Line 15 uses a leading space before 'catch' while other lines use tabs or no leading space. This should be aligned consistently with the surrounding try-catch block.

Suggested change
catch {
catch {

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +23
Write-Error "Neither 'codeql' nor 'gh' command found"
exit 1
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation: Lines 22-23 use tabs while most other lines in the file use spaces. These lines should use spaces to match the rest of the file's indentation style.

Suggested change
Write-Error "Neither 'codeql' nor 'gh' command found"
exit 1
Write-Error "Neither 'codeql' nor 'gh' command found"
exit 1

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant