From 4c329b7b62413c69e53adaba1b3756d5e7fe1ec5 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 14 Mar 2023 16:46:06 +0000 Subject: [PATCH 01/17] Java: Remove "please" in diagnostics Per review from docs team --- .../diagnostics/multiple-candidate-builds/diagnostics.expected | 2 +- .../java/diagnostics/no-build-system/diagnostics.expected | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected index 9e7a9ceec33..5225b86c981 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected @@ -13,7 +13,7 @@ } } { - "markdownMessage": "If you want to use one of the candidate build systems and directories (see previous warnings), please [supply a manual a build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language).", + "markdownMessage": "If you want to use one of the candidate build systems and directories (see previous warnings), [supply a manual a build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language).", "severity": "error", "source": { "extractorName": "java", diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/diagnostics.expected index f465cd5df84..cba85d885d6 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/diagnostics.expected @@ -1,5 +1,5 @@ { - "markdownMessage": "Could not find a Gradle, Maven or Ant top-level project to build. Please [supply a manual build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language).", + "markdownMessage": "Could not find a Gradle, Maven or Ant top-level project to build. [Supply a manual build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language).", "severity": "error", "source": { "extractorName": "java", From 110cb64b7a7aa53d1860a89a094d966f4665ae3f Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 14 Mar 2023 16:52:58 +0000 Subject: [PATCH 02/17] Java: Avoid reference to other diagnostics --- .../diagnostics/multiple-candidate-builds/diagnostics.expected | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected index 5225b86c981..fd16032ce2f 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected @@ -13,7 +13,7 @@ } } { - "markdownMessage": "If you want to use one of the candidate build systems and directories (see previous warnings), [supply a manual a build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language).", + "markdownMessage": "Could not identify a unique top-level project to build. [Supply a manual build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language).", "severity": "error", "source": { "extractorName": "java", From 819e0dfbf08e3dac9f673420a2c82474d5b49e5e Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 14 Mar 2023 16:54:14 +0000 Subject: [PATCH 03/17] Java: Use "relevant" instead of "suspicious" --- .../android-gradle-incompatibility/diagnostics.expected | 4 ++-- .../diagnostics/compilation-error/diagnostics.expected | 6 +++--- .../diagnostics/dependency-error/diagnostics.expected | 2 +- .../diagnostics/java-version-too-old/diagnostics.expected | 4 ++-- .../maven-http-repository/diagnostics.expected | 8 ++++---- .../no-gradle-test-classes/diagnostics.expected | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/diagnostics.expected index 5446916799d..34d7835bf5e 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/android-gradle-incompatibility/diagnostics.expected @@ -1,5 +1,5 @@ { - "markdownMessage": "An Android build may have failed. Ensure the Code Scanning workflow installs required dependencies, and that the [Gradle and Android SDK versions are compatible](https://developer.android.com/studio/releases/gradle-plugin#updating-gradle).\n\nSuspicious output line: ` > Minimum supported Gradle version is 7.4. Current version is 7.3. If using the gradle wrapper, try editing the distributionUrl in /gradle/wrapper/gradle-wrapper.properties to gradle-7.4-all.zip`", + "markdownMessage": "An Android build may have failed. Ensure the Code Scanning workflow installs required dependencies, and that the [Gradle and Android SDK versions are compatible](https://developer.android.com/studio/releases/gradle-plugin#updating-gradle).\n\nRelevant output line: ` > Minimum supported Gradle version is 7.4. Current version is 7.3. If using the gradle wrapper, try editing the distributionUrl in /gradle/wrapper/gradle-wrapper.properties to gradle-7.4-all.zip`", "severity": "error", "source": { "extractorName": "java", @@ -13,7 +13,7 @@ } } { - "markdownMessage": "An Android build may have failed. Ensure the Code Scanning workflow installs required dependencies, and that the [Gradle and Android SDK versions are compatible](https://developer.android.com/studio/releases/gradle-plugin#updating-gradle).\n\nSuspicious output line: `Caused by: java.lang.RuntimeException: Minimum supported Gradle version is 7.4. Current version is 7.3. If using the gradle wrapper, try editing the distributionUrl in /gradle/wrapper/gradle-wrapper.properties to gradle-7.4-all.zip`", + "markdownMessage": "An Android build may have failed. Ensure the Code Scanning workflow installs required dependencies, and that the [Gradle and Android SDK versions are compatible](https://developer.android.com/studio/releases/gradle-plugin#updating-gradle).\n\nRelevant output line: `Caused by: java.lang.RuntimeException: Minimum supported Gradle version is 7.4. Current version is 7.3. If using the gradle wrapper, try editing the distributionUrl in /gradle/wrapper/gradle-wrapper.properties to gradle-7.4-all.zip`", "severity": "error", "source": { "extractorName": "java", diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/diagnostics.expected index 34a7884823d..3d087084db0 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/compilation-error/diagnostics.expected @@ -1,5 +1,5 @@ { - "markdownMessage": "A compilation error was observed while autobuilding your code. Check that your Code Scanning workflow installs the needed compiler version and dependencies.\n\nSuspicious output line: `[ERROR] COMPILATION ERROR : `", + "markdownMessage": "A compilation error was observed while autobuilding your code. Check that your Code Scanning workflow installs the needed compiler version and dependencies.\n\nRelevant output line: `[ERROR] COMPILATION ERROR : `", "severity": "error", "source": { "extractorName": "java", @@ -13,7 +13,7 @@ } } { - "markdownMessage": "A compilation error was observed while autobuilding your code. Check that your Code Scanning workflow installs the needed compiler version and dependencies.\n\nSuspicious output line: `[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project maven-sample: Compilation failure`", + "markdownMessage": "A compilation error was observed while autobuilding your code. Check that your Code Scanning workflow installs the needed compiler version and dependencies.\n\nRelevant output line: `[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project maven-sample: Compilation failure`", "severity": "error", "source": { "extractorName": "java", @@ -27,7 +27,7 @@ } } { - "markdownMessage": "A compilation error was observed while autobuilding your code. Check that your Code Scanning workflow installs the needed compiler version and dependencies.\n\nSuspicious output line: `org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project maven-sample: Compilation failure`", + "markdownMessage": "A compilation error was observed while autobuilding your code. Check that your Code Scanning workflow installs the needed compiler version and dependencies.\n\nRelevant output line: `org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project maven-sample: Compilation failure`", "severity": "error", "source": { "extractorName": "java", diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/diagnostics.expected index fbb583581f2..d97eb904658 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/dependency-error/diagnostics.expected @@ -1,5 +1,5 @@ { - "markdownMessage": "A dependency failed to download. Check that all dependencies are available, and [supply credentials for any private dependencies](https://github.com/Azure/actions-workflow-samples/blob/master/assets/create-secrets-for-GitHub-workflows.md#set-up-secrets-in-github-action-workflows).\n\nSuspicious output line: `Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact junit:junit-nonesuch:jar:4.11 in central (https://repo.maven.apache.org/maven2)`", + "markdownMessage": "A dependency failed to download. Check that all dependencies are available, and [supply credentials for any private dependencies](https://github.com/Azure/actions-workflow-samples/blob/master/assets/create-secrets-for-GitHub-workflows.md#set-up-secrets-in-github-action-workflows).\n\nRelevant output line: `Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact junit:junit-nonesuch:jar:4.11 in central (https://repo.maven.apache.org/maven2)`", "severity": "error", "source": { "extractorName": "java", diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/diagnostics.expected index 396198d057a..c002fd22788 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/java-version-too-old/diagnostics.expected @@ -1,5 +1,5 @@ { - "markdownMessage": "Your project may need a different JDK version. Ensure your Code Scanning workflow file has [an appropriate `setup-java` step](https://github.com/actions/setup-java#eclipse-temurin).\n\nSuspicious output line: `> Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'.`", + "markdownMessage": "Your project may need a different JDK version. Ensure your Code Scanning workflow file has [an appropriate `setup-java` step](https://github.com/actions/setup-java#eclipse-temurin).\n\nRelevant output line: `> Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'.`", "severity": "error", "source": { "extractorName": "java", @@ -13,7 +13,7 @@ } } { - "markdownMessage": "Your project may need a different JDK version. Ensure your Code Scanning workflow file has [an appropriate `setup-java` step](https://github.com/actions/setup-java#eclipse-temurin).\n\nSuspicious output line: `Caused by: java.lang.IllegalArgumentException: Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'.`", + "markdownMessage": "Your project may need a different JDK version. Ensure your Code Scanning workflow file has [an appropriate `setup-java` step](https://github.com/actions/setup-java#eclipse-temurin).\n\nRelevant output line: `Caused by: java.lang.IllegalArgumentException: Could not target platform: 'Java SE 11' using tool chain: 'JDK 8 (1.8)'.`", "severity": "error", "source": { "extractorName": "java", diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/diagnostics.expected index 301efee2929..451be591b42 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/diagnostics.expected @@ -1,5 +1,5 @@ { - "markdownMessage": "Building your code triggered an access to an insecure HTTP Maven repository. Allow access to insecure repositories, or [update your build to use HTTPS](https://maven.apache.org/docs/3.8.1/release-notes.html#how-to-fix-when-i-get-a-http-repository-blocked).\n\nSuspicious output line: `Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact junit-nonesuch:junit-nonesuch:pom:4.11 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [insecure (http://repo.maven.apache.org/maven2/, default, releases+snapshots)]`", + "markdownMessage": "Building your code triggered an access to an insecure HTTP Maven repository. Allow access to insecure repositories, or [update your build to use HTTPS](https://maven.apache.org/docs/3.8.1/release-notes.html#how-to-fix-when-i-get-a-http-repository-blocked).\n\nRelevant output line: `Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact junit-nonesuch:junit-nonesuch:pom:4.11 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [insecure (http://repo.maven.apache.org/maven2/, default, releases+snapshots)]`", "severity": "error", "source": { "extractorName": "java", @@ -13,7 +13,7 @@ } } { - "markdownMessage": "Building your code triggered an access to an insecure HTTP Maven repository. Allow access to insecure repositories, or [update your build to use HTTPS](https://maven.apache.org/docs/3.8.1/release-notes.html#how-to-fix-when-i-get-a-http-repository-blocked).\n\nSuspicious output line: `Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact junit-nonesuch:junit-nonesuch:pom:4.11 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [insecure (http://repo.maven.apache.org/maven2/, default, releases+snapshots)]`", + "markdownMessage": "Building your code triggered an access to an insecure HTTP Maven repository. Allow access to insecure repositories, or [update your build to use HTTPS](https://maven.apache.org/docs/3.8.1/release-notes.html#how-to-fix-when-i-get-a-http-repository-blocked).\n\nRelevant output line: `Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact junit-nonesuch:junit-nonesuch:pom:4.11 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [insecure (http://repo.maven.apache.org/maven2/, default, releases+snapshots)]`", "severity": "error", "source": { "extractorName": "java", @@ -27,7 +27,7 @@ } } { - "markdownMessage": "Building your code triggered an access to an insecure HTTP Maven repository. Allow access to insecure repositories, or [update your build to use HTTPS](https://maven.apache.org/docs/3.8.1/release-notes.html#how-to-fix-when-i-get-a-http-repository-blocked).\n\nSuspicious output line: `Caused by: org.eclipse.aether.transfer.NoRepositoryConnectorException: Blocked mirror for repositories: [insecure (http://repo.maven.apache.org/maven2/, default, releases+snapshots)]`", + "markdownMessage": "Building your code triggered an access to an insecure HTTP Maven repository. Allow access to insecure repositories, or [update your build to use HTTPS](https://maven.apache.org/docs/3.8.1/release-notes.html#how-to-fix-when-i-get-a-http-repository-blocked).\n\nRelevant output line: `Caused by: org.eclipse.aether.transfer.NoRepositoryConnectorException: Blocked mirror for repositories: [insecure (http://repo.maven.apache.org/maven2/, default, releases+snapshots)]`", "severity": "error", "source": { "extractorName": "java", @@ -41,7 +41,7 @@ } } { - "markdownMessage": "Building your code triggered an access to an insecure HTTP Maven repository. Allow access to insecure repositories, or [update your build to use HTTPS](https://maven.apache.org/docs/3.8.1/release-notes.html#how-to-fix-when-i-get-a-http-repository-blocked).\n\nSuspicious output line: `[ERROR] Failed to execute goal on project maven-sample: Could not resolve dependencies for project com.example:maven-sample:jar:1.0-SNAPSHOT: Failed to collect dependencies at junit-nonesuch:junit-nonesuch:jar:4.11: Failed to read artifact descriptor for junit-nonesuch:junit-nonesuch:jar:4.11: Could not transfer artifact junit-nonesuch:junit-nonesuch:pom:4.11 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [insecure (http://repo.maven.apache.org/maven2/, default, releases+snapshots)] -> [Help 1]`", + "markdownMessage": "Building your code triggered an access to an insecure HTTP Maven repository. Allow access to insecure repositories, or [update your build to use HTTPS](https://maven.apache.org/docs/3.8.1/release-notes.html#how-to-fix-when-i-get-a-http-repository-blocked).\n\nRelevant output line: `[ERROR] Failed to execute goal on project maven-sample: Could not resolve dependencies for project com.example:maven-sample:jar:1.0-SNAPSHOT: Failed to collect dependencies at junit-nonesuch:junit-nonesuch:jar:4.11: Failed to read artifact descriptor for junit-nonesuch:junit-nonesuch:jar:4.11: Could not transfer artifact junit-nonesuch:junit-nonesuch:pom:4.11 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [insecure (http://repo.maven.apache.org/maven2/, default, releases+snapshots)] -> [Help 1]`", "severity": "error", "source": { "extractorName": "java", diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected index a6c5e2eb877..a2178b79fc2 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected @@ -13,7 +13,7 @@ } } { - "markdownMessage": "Gradle project does not define a `testClasses` goal. [Supply a manual build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language) that builds the code that should be analyzed.\n\nSuspicious output line: `org.gradle.execution.TaskSelectionException: Task 'testClasses' not found in root project 'no-gradle-test-classes'.`", + "markdownMessage": "Gradle project does not define a `testClasses` goal. [Supply a manual build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language) that builds the code that should be analyzed.\n\nRelevant output line: `org.gradle.execution.TaskSelectionException: Task 'testClasses' not found in root project 'no-gradle-test-classes'.`", "severity": "error", "source": { "extractorName": "java", From ce96f009b7126fc0eb2e1265345f73c205eff0f6 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 14 Mar 2023 16:58:24 +0000 Subject: [PATCH 04/17] Java: Capitalise HTTPS --- .../maven-http-repository/diagnostics.expected | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/diagnostics.expected index 451be591b42..5e7d5956858 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/maven-http-repository/diagnostics.expected @@ -4,7 +4,7 @@ "source": { "extractorName": "java", "id": "java/autobuilder/non-https-repository", - "name": "A non-https Maven repository access failed" + "name": "A non-HTTPS Maven repository access failed" }, "visibility": { "cliSummaryTable": false, @@ -18,7 +18,7 @@ "source": { "extractorName": "java", "id": "java/autobuilder/non-https-repository", - "name": "A non-https Maven repository access failed" + "name": "A non-HTTPS Maven repository access failed" }, "visibility": { "cliSummaryTable": false, @@ -32,7 +32,7 @@ "source": { "extractorName": "java", "id": "java/autobuilder/non-https-repository", - "name": "A non-https Maven repository access failed" + "name": "A non-HTTPS Maven repository access failed" }, "visibility": { "cliSummaryTable": false, @@ -46,7 +46,7 @@ "source": { "extractorName": "java", "id": "java/autobuilder/non-https-repository", - "name": "A non-https Maven repository access failed" + "name": "A non-HTTPS Maven repository access failed" }, "visibility": { "cliSummaryTable": true, From 770924455e059c6f9f02a72b42eec901a2845219 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 14 Mar 2023 17:00:48 +0000 Subject: [PATCH 05/17] Java: Use Dotcom help links --- .../multiple-candidate-builds/diagnostics.expected | 4 ++-- .../java/diagnostics/no-build-system/diagnostics.expected | 2 +- .../diagnostics/no-gradle-test-classes/diagnostics.expected | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected index fd16032ce2f..c55a814c684 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/multiple-candidate-builds/diagnostics.expected @@ -1,5 +1,5 @@ { - "markdownMessage": "Building using Maven was skipped because there were multiple sibling build directories containing build files: [./maven-project-1,./maven-project-2]. If you want to use one of these, please [manually supply a build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language).", + "markdownMessage": "Building using Maven was skipped because there were multiple sibling build directories containing build files: [./maven-project-1,./maven-project-2]. If you want to use one of these, please [manually supply a build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language).", "severity": "warning", "source": { "extractorName": "java", @@ -13,7 +13,7 @@ } } { - "markdownMessage": "Could not identify a unique top-level project to build. [Supply a manual build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language).", + "markdownMessage": "Could not identify a unique top-level project to build. [Supply a manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language).", "severity": "error", "source": { "extractorName": "java", diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/diagnostics.expected index cba85d885d6..a4568fcd233 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/no-build-system/diagnostics.expected @@ -1,5 +1,5 @@ { - "markdownMessage": "Could not find a Gradle, Maven or Ant top-level project to build. [Supply a manual build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language).", + "markdownMessage": "Could not find a Gradle, Maven or Ant top-level project to build. [Supply a manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language).", "severity": "error", "source": { "extractorName": "java", diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected index a2178b79fc2..a2f32b50c82 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected @@ -13,7 +13,7 @@ } } { - "markdownMessage": "Gradle project does not define a `testClasses` goal. [Supply a manual build command](https://docs.github.com/en/github-ae@latest/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language) that builds the code that should be analyzed.\n\nRelevant output line: `org.gradle.execution.TaskSelectionException: Task 'testClasses' not found in root project 'no-gradle-test-classes'.`", + "markdownMessage": "Gradle project does not define a `testClasses` goal. [Supply a manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages#adding-build-steps-for-a-compiled-language) that builds the code that should be analyzed.\n\nRelevant output line: `org.gradle.execution.TaskSelectionException: Task 'testClasses' not found in root project 'no-gradle-test-classes'.`", "severity": "error", "source": { "extractorName": "java", From 6fbc8261f22cc1a15c228bbbb1eb27e9e92ea29f Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 14 Mar 2023 17:03:42 +0000 Subject: [PATCH 06/17] Java: Add a full stop --- .../diagnostics/no-gradle-test-classes/diagnostics.expected | 2 +- .../java/diagnostics/no-gradle-wrapper/diagnostics.expected | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected index a2f32b50c82..30e328253da 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-test-classes/diagnostics.expected @@ -1,5 +1,5 @@ { - "markdownMessage": "Built a Gradle project without the [Gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html). This may use an incompatible version of Gradle", + "markdownMessage": "Built a Gradle project without the [Gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html). This may use an incompatible version of Gradle.", "severity": "warning", "source": { "extractorName": "java", diff --git a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/diagnostics.expected b/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/diagnostics.expected index ad5c5bdb7c6..feef1ed590d 100644 --- a/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/diagnostics.expected +++ b/java/ql/integration-tests/all-platforms/java/diagnostics/no-gradle-wrapper/diagnostics.expected @@ -1,5 +1,5 @@ { - "markdownMessage": "Built a Gradle project without the [Gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html). This may use an incompatible version of Gradle", + "markdownMessage": "Built a Gradle project without the [Gradle wrapper](https://docs.gradle.org/current/userguide/gradle_wrapper.html). This may use an incompatible version of Gradle.", "severity": "warning", "source": { "extractorName": "java", From 769f9051af8999ce2cfecacb86e9a220452d12fb Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 14 Mar 2023 17:09:25 +0000 Subject: [PATCH 07/17] Ruby: Serialize severities as lowercase --- ruby/extractor/src/diagnostics.rs | 1 + .../diagnostics/syntax-error/diagnostics.expected | 4 ++-- .../diagnostics/unknown-encoding/diagnostics.expected | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ruby/extractor/src/diagnostics.rs b/ruby/extractor/src/diagnostics.rs index ddef135c485..d9b3b3e0f7e 100644 --- a/ruby/extractor/src/diagnostics.rs +++ b/ruby/extractor/src/diagnostics.rs @@ -3,6 +3,7 @@ use std::io::Write; use std::path::PathBuf; /** SARIF severity */ #[derive(Serialize)] +#[serde(rename_all = "lowercase")] pub enum Severity { Error, Warning, diff --git a/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected b/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected index 2ed9ee863de..994e52ce988 100644 --- a/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected +++ b/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected @@ -11,7 +11,7 @@ }, "markdownMessage": "A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or [exclude](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning) the file from analysis.", "plaintextMessage": "A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis.", - "severity": "Warning", + "severity": "warning", "source": { "extractorName": "ruby", "id": "ruby/parse-error", @@ -34,7 +34,7 @@ }, "markdownMessage": "A parse error occurred (expected `end` symbol). Check the syntax of the file. If the file is invalid, correct the error or [exclude](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning) the file from analysis.", "plaintextMessage": "A parse error occurred (expected end symbol). Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis.", - "severity": "Warning", + "severity": "warning", "source": { "extractorName": "ruby", "id": "ruby/parse-error", diff --git a/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected b/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected index f67e92b9c57..e1d74aa4391 100644 --- a/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected +++ b/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected @@ -7,7 +7,7 @@ }, "markdownMessage": "Unknown character encoding `silly` in `#encoding:` [directive](https://docs.ruby-lang.org/en/master/syntax/comments_rdoc.html#label-encoding+Directive).", "plaintextMessage": "Unknown character encoding silly in #encoding: directive.", - "severity": "Warning", + "severity": "warning", "source": { "extractorName": "ruby", "id": "ruby/unknown-character-encoding", From a6509c7a37783593d5510c53454f409e94e56ff9 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 14 Mar 2023 17:13:50 +0000 Subject: [PATCH 08/17] Ruby: Use `rb` prefix in diagnostic IDs for consistency with queries --- ruby/extractor/src/diagnostics.rs | 2 +- .../diagnostics/syntax-error/diagnostics.expected | 4 ++-- .../diagnostics/unknown-encoding/diagnostics.expected | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ruby/extractor/src/diagnostics.rs b/ruby/extractor/src/diagnostics.rs index d9b3b3e0f7e..387d7ca0fd2 100644 --- a/ruby/extractor/src/diagnostics.rs +++ b/ruby/extractor/src/diagnostics.rs @@ -93,7 +93,7 @@ impl LogWriter { DiagnosticMessage { timestamp: chrono::Utc::now(), source: Source { - id: format!("{}/{}", self.extractor, id), + id: format!("rb/{}", id), name: name.to_owned(), extractor_name: Some(self.extractor.to_owned()), }, diff --git a/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected b/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected index 994e52ce988..ec8c9b640d0 100644 --- a/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected +++ b/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected @@ -14,7 +14,7 @@ "severity": "warning", "source": { "extractorName": "ruby", - "id": "ruby/parse-error", + "id": "rb/parse-error", "name": "Parse error" }, "visibility": { @@ -37,7 +37,7 @@ "severity": "warning", "source": { "extractorName": "ruby", - "id": "ruby/parse-error", + "id": "rb/parse-error", "name": "Parse error" }, "visibility": { diff --git a/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected b/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected index e1d74aa4391..cafd4ad4f36 100644 --- a/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected +++ b/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected @@ -10,7 +10,7 @@ "severity": "warning", "source": { "extractorName": "ruby", - "id": "ruby/unknown-character-encoding", + "id": "rb/unknown-character-encoding", "name": "Unknown character encoding" }, "visibility": { From 7e4f77bfb3ce18be509e02eff5e162965f1283b7 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 14 Mar 2023 17:23:00 +0000 Subject: [PATCH 09/17] C#: Only serialize the location if it is present --- csharp/extractor/Semmle.Util/ToolStatusPage.cs | 4 ++-- .../diag_dotnet_incompatible/diagnostics.expected | 2 -- .../diag_missing_project_files/diagnostics.expected | 2 -- .../diag_missing_xamarin_sdk/diagnostics.expected | 3 --- .../posix-only/diag_autobuild_script/diagnostics.expected | 2 -- .../posix-only/diag_multiple_scripts/diagnostics.expected | 2 -- .../windows-only/diag_autobuild_script/diagnostics.expected | 2 -- .../windows-only/diag_multiple_scripts/diagnostics.expected | 2 -- 8 files changed, 2 insertions(+), 17 deletions(-) diff --git a/csharp/extractor/Semmle.Util/ToolStatusPage.cs b/csharp/extractor/Semmle.Util/ToolStatusPage.cs index d71ad876e1b..a3f8297e844 100644 --- a/csharp/extractor/Semmle.Util/ToolStatusPage.cs +++ b/csharp/extractor/Semmle.Util/ToolStatusPage.cs @@ -151,7 +151,7 @@ namespace Semmle.Util /// public bool Internal { get; } public TspVisibility Visibility { get; } - public TspLocation Location { get; } + public TspLocation? Location { get; } /// /// Structured metadata about the diagnostic message. /// @@ -173,7 +173,7 @@ namespace Semmle.Util this.Attributes = new Dictionary(); this.Severity = severity; this.Visibility = visibility ?? TspVisibility.All; - this.Location = location ?? new TspLocation(); + this.Location = location; this.Internal = intrnl ?? false; this.MarkdownMessage = markdownMessage; this.PlaintextMessage = plaintextMessage; diff --git a/csharp/ql/integration-tests/all-platforms/diag_dotnet_incompatible/diagnostics.expected b/csharp/ql/integration-tests/all-platforms/diag_dotnet_incompatible/diagnostics.expected index 91a9bbbb267..689ddcc3652 100644 --- a/csharp/ql/integration-tests/all-platforms/diag_dotnet_incompatible/diagnostics.expected +++ b/csharp/ql/integration-tests/all-platforms/diag_dotnet_incompatible/diagnostics.expected @@ -2,7 +2,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "CodeQL found some projects which cannot be built with .NET Core:\n\n- `test.csproj`", "severity": "warning", "source": { @@ -20,7 +19,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "CodeQL was unable to build the following projects using MSBuild:\n\n- `test.csproj`\n\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { diff --git a/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/diagnostics.expected b/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/diagnostics.expected index da2b3d93941..8e9a6efdff5 100644 --- a/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/diagnostics.expected +++ b/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/diagnostics.expected @@ -2,7 +2,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "CodeQL was unable to build the following projects using MSBuild:\n\n- `test.sln`\n\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { @@ -20,7 +19,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "Some project files were not found when CodeQL built your project:\n\n- `Example.csproj`\n- `Example.Test.csproj`\n\nThis may lead to subsequent failures. You can check for common causes for missing project files:\n\n- Ensure that the project is built using the [intended operating system](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on) and that filenames on case-sensitive platforms are correctly specified.\n- If your repository uses Git submodules, ensure that those are [checked out](https://github.com/actions/checkout#usage) before the CodeQL action is run.\n- If you auto-generate some project files as part of your build process, ensure that these are generated before the CodeQL action is run.", "severity": "error", "source": { diff --git a/csharp/ql/integration-tests/all-platforms/diag_missing_xamarin_sdk/diagnostics.expected b/csharp/ql/integration-tests/all-platforms/diag_missing_xamarin_sdk/diagnostics.expected index 0becfa08cee..0825ee8ae85 100644 --- a/csharp/ql/integration-tests/all-platforms/diag_missing_xamarin_sdk/diagnostics.expected +++ b/csharp/ql/integration-tests/all-platforms/diag_missing_xamarin_sdk/diagnostics.expected @@ -2,7 +2,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "CodeQL was unable to build the following projects using .NET Core:\n\n- `test.csproj`\n\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { @@ -20,7 +19,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "CodeQL was unable to build the following projects using MSBuild:\n\n- `test.csproj`\n\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { @@ -38,7 +36,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "[Configure your workflow](https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-xamarin-applications) for this SDK before running CodeQL.", "severity": "error", "source": { diff --git a/csharp/ql/integration-tests/posix-only/diag_autobuild_script/diagnostics.expected b/csharp/ql/integration-tests/posix-only/diag_autobuild_script/diagnostics.expected index 6fe50ccfa5b..d97ed17cf9a 100644 --- a/csharp/ql/integration-tests/posix-only/diag_autobuild_script/diagnostics.expected +++ b/csharp/ql/integration-tests/posix-only/diag_autobuild_script/diagnostics.expected @@ -2,7 +2,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "CodeQL attempted to build your project using a script located at `build.sh`, which failed. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { @@ -20,7 +19,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "CodeQL could not find any project or solution files in your repository. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { diff --git a/csharp/ql/integration-tests/posix-only/diag_multiple_scripts/diagnostics.expected b/csharp/ql/integration-tests/posix-only/diag_multiple_scripts/diagnostics.expected index 5ba4bc963eb..accf5cb7d0b 100644 --- a/csharp/ql/integration-tests/posix-only/diag_multiple_scripts/diagnostics.expected +++ b/csharp/ql/integration-tests/posix-only/diag_multiple_scripts/diagnostics.expected @@ -2,7 +2,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "CodeQL could not find any project or solution files in your repository. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { @@ -20,7 +19,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "CodeQL found multiple potential build scripts for your project and attempted to run `build.sh`, which failed. This may not be the right build script for your project. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { diff --git a/csharp/ql/integration-tests/windows-only/diag_autobuild_script/diagnostics.expected b/csharp/ql/integration-tests/windows-only/diag_autobuild_script/diagnostics.expected index 347e3d64342..b394510d19a 100644 --- a/csharp/ql/integration-tests/windows-only/diag_autobuild_script/diagnostics.expected +++ b/csharp/ql/integration-tests/windows-only/diag_autobuild_script/diagnostics.expected @@ -2,7 +2,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "CodeQL attempted to build your project using a script located at `build.bat`, which failed. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { @@ -20,7 +19,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "CodeQL could not find any project or solution files in your repository. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { diff --git a/csharp/ql/integration-tests/windows-only/diag_multiple_scripts/diagnostics.expected b/csharp/ql/integration-tests/windows-only/diag_multiple_scripts/diagnostics.expected index 073ec0ba9c8..2d2f14318b2 100644 --- a/csharp/ql/integration-tests/windows-only/diag_multiple_scripts/diagnostics.expected +++ b/csharp/ql/integration-tests/windows-only/diag_multiple_scripts/diagnostics.expected @@ -2,7 +2,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "CodeQL could not find any project or solution files in your repository. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { @@ -20,7 +19,6 @@ "attributes": {}, "helpLinks": [], "internal": false, - "location": {}, "markdownMessage": "CodeQL found multiple potential build scripts for your project and attempted to run `build.bat`, which failed. This may not be the right build script for your project. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { From bc106873c14b7d36c1415365e338d05355daeeb6 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 14 Mar 2023 17:24:30 +0000 Subject: [PATCH 10/17] C#: Fix casing of "CodeQL Action" --- .../Semmle.Autobuild.CSharp/CSharpDiagnosticClassifier.cs | 4 ++-- .../diag_missing_project_files/diagnostics.expected | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpDiagnosticClassifier.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpDiagnosticClassifier.cs index e72c46ff361..821ad3222e1 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpDiagnosticClassifier.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpDiagnosticClassifier.cs @@ -84,8 +84,8 @@ namespace Semmle.Autobuild.CSharp This may lead to subsequent failures. You can check for common causes for missing project files: - Ensure that the project is built using the {runsOnDocsUrl.ToMarkdownLink("intended operating system")} and that filenames on case-sensitive platforms are correctly specified. - - If your repository uses Git submodules, ensure that those are {checkoutDocsUrl.ToMarkdownLink("checked out")} before the CodeQL action is run. - - If you auto-generate some project files as part of your build process, ensure that these are generated before the CodeQL action is run. + - If your repository uses Git submodules, ensure that those are {checkoutDocsUrl.ToMarkdownLink("checked out")} before the CodeQL Action is run. + - If you auto-generate some project files as part of your build process, ensure that these are generated before the CodeQL Action is run. """ ); } diff --git a/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/diagnostics.expected b/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/diagnostics.expected index 8e9a6efdff5..6eca0003987 100644 --- a/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/diagnostics.expected +++ b/csharp/ql/integration-tests/all-platforms/diag_missing_project_files/diagnostics.expected @@ -19,7 +19,7 @@ "attributes": {}, "helpLinks": [], "internal": false, - "markdownMessage": "Some project files were not found when CodeQL built your project:\n\n- `Example.csproj`\n- `Example.Test.csproj`\n\nThis may lead to subsequent failures. You can check for common causes for missing project files:\n\n- Ensure that the project is built using the [intended operating system](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on) and that filenames on case-sensitive platforms are correctly specified.\n- If your repository uses Git submodules, ensure that those are [checked out](https://github.com/actions/checkout#usage) before the CodeQL action is run.\n- If you auto-generate some project files as part of your build process, ensure that these are generated before the CodeQL action is run.", + "markdownMessage": "Some project files were not found when CodeQL built your project:\n\n- `Example.csproj`\n- `Example.Test.csproj`\n\nThis may lead to subsequent failures. You can check for common causes for missing project files:\n\n- Ensure that the project is built using the [intended operating system](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on) and that filenames on case-sensitive platforms are correctly specified.\n- If your repository uses Git submodules, ensure that those are [checked out](https://github.com/actions/checkout#usage) before the CodeQL Action is run.\n- If you auto-generate some project files as part of your build process, ensure that these are generated before the CodeQL Action is run.", "severity": "error", "source": { "extractorName": "csharp", From 1f63c5d5e49aa538359abb4c4b15c462cade17d4 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 14 Mar 2023 21:43:32 +0000 Subject: [PATCH 11/17] JS: Update parse error diagnostic name for consistency --- javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java | 2 +- .../all-platforms/diagnostics/syntax-error/diagnostics.expected | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java index ccde9f79320..1c7dd728101 100644 --- a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java +++ b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java @@ -508,7 +508,7 @@ public class AutoBuild { * For use with the {@link #writeDiagnostics(String, JSDiagnosticKind)} method. */ public static enum JSDiagnosticKind { - PARSE_ERROR("parse-error", "Parse error", DiagnosticLevel.Warning), + PARSE_ERROR("parse-error", "Could not process some files due to syntax errors", DiagnosticLevel.Warning), INTERNAL_ERROR("internal-error", "Internal error", DiagnosticLevel.Debug); private final String id; diff --git a/javascript/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected b/javascript/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected index 6337f4a4692..a480f2fe3dd 100644 --- a/javascript/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected +++ b/javascript/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected @@ -11,7 +11,7 @@ "source": { "extractorName": "javascript", "id": "javascript/parse-error", - "name": "Parse error" + "name": "Could not process some files due to syntax errors" }, "visibility": { "cliSummaryTable": true, From 1394abcf9803056ef1b4695ee1311b59d9918a34 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 14 Mar 2023 21:44:19 +0000 Subject: [PATCH 12/17] JS: Update diagnostics IDs for consistency with rules --- javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java | 2 +- .../all-platforms/diagnostics/syntax-error/diagnostics.expected | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java index 1c7dd728101..629c3d151c1 100644 --- a/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java +++ b/javascript/extractor/src/com/semmle/js/extractor/AutoBuild.java @@ -568,7 +568,7 @@ public class AutoBuild { } // DiagnosticLevel level, String extractorName, String sourceId, String sourceName, String markdown - diagnostics.get().writeMarkdown(error.getLevel(), "javascript", "javascript/" + error.getId(), error.getName(), + diagnostics.get().writeMarkdown(error.getLevel(), "javascript", "js/" + error.getId(), error.getName(), message, location); } diff --git a/javascript/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected b/javascript/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected index a480f2fe3dd..0c4405ea92b 100644 --- a/javascript/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected +++ b/javascript/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected @@ -10,7 +10,7 @@ "severity": "warning", "source": { "extractorName": "javascript", - "id": "javascript/parse-error", + "id": "js/parse-error", "name": "Could not process some files due to syntax errors" }, "visibility": { From 1454890a584a6644e3971ddbc51f9c12400fe178 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 14 Mar 2023 21:52:23 +0000 Subject: [PATCH 13/17] C#: Add new paragraphs before call to action --- .../autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs | 4 ++-- .../posix-only/diag_autobuild_script/diagnostics.expected | 4 ++-- .../posix-only/diag_multiple_scripts/diagnostics.expected | 4 ++-- .../windows-only/diag_autobuild_script/diagnostics.expected | 4 ++-- .../windows-only/diag_multiple_scripts/diagnostics.expected | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs index ed2ed4013ef..15d43ceda1e 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs @@ -104,7 +104,7 @@ namespace Semmle.Autobuild.CSharp markdownMessage: "CodeQL found multiple potential build scripts for your project and " + $"attempted to run `{relScriptPath}`, which failed. " + - "This may not be the right build script for your project. " + + "This may not be the right build script for your project.\n\n" + $"Set up a [manual build command]({buildCommandDocsUrl})." ) : new( @@ -113,7 +113,7 @@ namespace Semmle.Autobuild.CSharp "Unable to build project using build script", markdownMessage: "CodeQL attempted to build your project using a script located at " + - $"`{relScriptPath}`, which failed. " + + $"`{relScriptPath}`, which failed.\n\n" + $"Set up a [manual build command]({buildCommandDocsUrl})." ); diff --git a/csharp/ql/integration-tests/posix-only/diag_autobuild_script/diagnostics.expected b/csharp/ql/integration-tests/posix-only/diag_autobuild_script/diagnostics.expected index d97ed17cf9a..129675517a6 100644 --- a/csharp/ql/integration-tests/posix-only/diag_autobuild_script/diagnostics.expected +++ b/csharp/ql/integration-tests/posix-only/diag_autobuild_script/diagnostics.expected @@ -2,7 +2,7 @@ "attributes": {}, "helpLinks": [], "internal": false, - "markdownMessage": "CodeQL attempted to build your project using a script located at `build.sh`, which failed. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", + "markdownMessage": "CodeQL attempted to build your project using a script located at `build.sh`, which failed.\n\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { "extractorName": "csharp", @@ -19,7 +19,7 @@ "attributes": {}, "helpLinks": [], "internal": false, - "markdownMessage": "CodeQL could not find any project or solution files in your repository. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", + "markdownMessage": "CodeQL could not find any project or solution files in your repository.\n\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { "extractorName": "csharp", diff --git a/csharp/ql/integration-tests/posix-only/diag_multiple_scripts/diagnostics.expected b/csharp/ql/integration-tests/posix-only/diag_multiple_scripts/diagnostics.expected index accf5cb7d0b..4e6b5823018 100644 --- a/csharp/ql/integration-tests/posix-only/diag_multiple_scripts/diagnostics.expected +++ b/csharp/ql/integration-tests/posix-only/diag_multiple_scripts/diagnostics.expected @@ -2,7 +2,7 @@ "attributes": {}, "helpLinks": [], "internal": false, - "markdownMessage": "CodeQL could not find any project or solution files in your repository. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", + "markdownMessage": "CodeQL could not find any project or solution files in your repository.\n\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { "extractorName": "csharp", @@ -19,7 +19,7 @@ "attributes": {}, "helpLinks": [], "internal": false, - "markdownMessage": "CodeQL found multiple potential build scripts for your project and attempted to run `build.sh`, which failed. This may not be the right build script for your project. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", + "markdownMessage": "CodeQL found multiple potential build scripts for your project and attempted to run `build.sh`, which failed. This may not be the right build script for your project.\n\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { "extractorName": "csharp", diff --git a/csharp/ql/integration-tests/windows-only/diag_autobuild_script/diagnostics.expected b/csharp/ql/integration-tests/windows-only/diag_autobuild_script/diagnostics.expected index b394510d19a..6135496f878 100644 --- a/csharp/ql/integration-tests/windows-only/diag_autobuild_script/diagnostics.expected +++ b/csharp/ql/integration-tests/windows-only/diag_autobuild_script/diagnostics.expected @@ -2,7 +2,7 @@ "attributes": {}, "helpLinks": [], "internal": false, - "markdownMessage": "CodeQL attempted to build your project using a script located at `build.bat`, which failed. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", + "markdownMessage": "CodeQL attempted to build your project using a script located at `build.bat`, which failed.\n\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { "extractorName": "csharp", @@ -19,7 +19,7 @@ "attributes": {}, "helpLinks": [], "internal": false, - "markdownMessage": "CodeQL could not find any project or solution files in your repository. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", + "markdownMessage": "CodeQL could not find any project or solution files in your repository.\n\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { "extractorName": "csharp", diff --git a/csharp/ql/integration-tests/windows-only/diag_multiple_scripts/diagnostics.expected b/csharp/ql/integration-tests/windows-only/diag_multiple_scripts/diagnostics.expected index 2d2f14318b2..4e165ac11fc 100644 --- a/csharp/ql/integration-tests/windows-only/diag_multiple_scripts/diagnostics.expected +++ b/csharp/ql/integration-tests/windows-only/diag_multiple_scripts/diagnostics.expected @@ -2,7 +2,7 @@ "attributes": {}, "helpLinks": [], "internal": false, - "markdownMessage": "CodeQL could not find any project or solution files in your repository. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", + "markdownMessage": "CodeQL could not find any project or solution files in your repository.\n\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { "extractorName": "csharp", @@ -19,7 +19,7 @@ "attributes": {}, "helpLinks": [], "internal": false, - "markdownMessage": "CodeQL found multiple potential build scripts for your project and attempted to run `build.bat`, which failed. This may not be the right build script for your project. Set up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", + "markdownMessage": "CodeQL found multiple potential build scripts for your project and attempted to run `build.bat`, which failed. This may not be the right build script for your project.\n\nSet up a [manual build command](https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages).", "severity": "error", "source": { "extractorName": "csharp", From 0de4259bff95c8ebdf36becc0f3e10451a820aa4 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 15 Mar 2023 11:57:00 +0000 Subject: [PATCH 14/17] Revert "Ruby: Use `rb` prefix in diagnostic IDs for consistency with queries" This reverts commit a6509c7a37783593d5510c53454f409e94e56ff9. --- ruby/extractor/src/diagnostics.rs | 2 +- .../diagnostics/syntax-error/diagnostics.expected | 4 ++-- .../diagnostics/unknown-encoding/diagnostics.expected | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ruby/extractor/src/diagnostics.rs b/ruby/extractor/src/diagnostics.rs index 387d7ca0fd2..d9b3b3e0f7e 100644 --- a/ruby/extractor/src/diagnostics.rs +++ b/ruby/extractor/src/diagnostics.rs @@ -93,7 +93,7 @@ impl LogWriter { DiagnosticMessage { timestamp: chrono::Utc::now(), source: Source { - id: format!("rb/{}", id), + id: format!("{}/{}", self.extractor, id), name: name.to_owned(), extractor_name: Some(self.extractor.to_owned()), }, diff --git a/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected b/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected index ec8c9b640d0..994e52ce988 100644 --- a/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected +++ b/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected @@ -14,7 +14,7 @@ "severity": "warning", "source": { "extractorName": "ruby", - "id": "rb/parse-error", + "id": "ruby/parse-error", "name": "Parse error" }, "visibility": { @@ -37,7 +37,7 @@ "severity": "warning", "source": { "extractorName": "ruby", - "id": "rb/parse-error", + "id": "ruby/parse-error", "name": "Parse error" }, "visibility": { diff --git a/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected b/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected index cafd4ad4f36..e1d74aa4391 100644 --- a/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected +++ b/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected @@ -10,7 +10,7 @@ "severity": "warning", "source": { "extractorName": "ruby", - "id": "rb/unknown-character-encoding", + "id": "ruby/unknown-character-encoding", "name": "Unknown character encoding" }, "visibility": { From a90f4915a7d0dbe74b2017fac95b034c5ea06cc4 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 15 Mar 2023 12:00:33 +0000 Subject: [PATCH 15/17] C#: Add new lines before call to action --- csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs index 15d43ceda1e..92c615419cc 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs @@ -135,7 +135,7 @@ namespace Semmle.Autobuild.CSharp "no-projects-or-solutions", "No project or solutions files found", markdownMessage: - "CodeQL could not find any project or solution files in your repository. " + + "CodeQL could not find any project or solution files in your repository.\n\n" + $"Set up a [manual build command]({buildCommandDocsUrl})." )); } From 5de0eae99224f3863181b4aff9bcd9f54630eb96 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 15 Mar 2023 12:05:09 +0000 Subject: [PATCH 16/17] Ruby: Update diagnostic source names for consistency --- ruby/extractor/src/bin/extractor.rs | 2 +- ruby/extractor/src/extractor.rs | 4 ++-- .../diagnostics/syntax-error/diagnostics.expected | 4 ++-- .../diagnostics/unknown-encoding/diagnostics.expected | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ruby/extractor/src/bin/extractor.rs b/ruby/extractor/src/bin/extractor.rs index cd5570d18bc..300a94444a6 100644 --- a/ruby/extractor/src/bin/extractor.rs +++ b/ruby/extractor/src/bin/extractor.rs @@ -223,7 +223,7 @@ fn main() -> std::io::Result<()> { } else { diagnostics_writer.write( diagnostics_writer - .new_entry("unknown-character-encoding", "Unknown character encoding") + .new_entry("unknown-character-encoding", "Could not process some files due to an unknown character encoding") .file(&file_paths::normalize_path(&path)) .message( "Unknown character encoding {} in {} {}.", diff --git a/ruby/extractor/src/extractor.rs b/ruby/extractor/src/extractor.rs index 59049bc789c..6c85706dce7 100644 --- a/ruby/extractor/src/extractor.rs +++ b/ruby/extractor/src/extractor.rs @@ -255,7 +255,7 @@ impl<'a> Visitor<'a> { ); let mut mesg = self .diagnostics_writer - .new_entry("parse-error", "Parse error"); + .new_entry("parse-error", "Could not process some files due to syntax errors"); &mesg .severity(diagnostics::Severity::Warning) .location(self.path, start_line, start_column, end_line, end_column) @@ -367,7 +367,7 @@ impl<'a> Visitor<'a> { self.record_parse_error( loc, self.diagnostics_writer - .new_entry("parse-error", "Parse error") + .new_entry("parse-error", "Could not process some files due to syntax errors") .severity(diagnostics::Severity::Warning) .location(self.path, start_line, start_column, end_line, end_column) .message( diff --git a/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected b/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected index 994e52ce988..d9ae8e1b617 100644 --- a/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected +++ b/ruby/ql/integration-tests/all-platforms/diagnostics/syntax-error/diagnostics.expected @@ -15,7 +15,7 @@ "source": { "extractorName": "ruby", "id": "ruby/parse-error", - "name": "Parse error" + "name": "Could not process some files due to syntax errors" }, "visibility": { "statusPage": true @@ -38,7 +38,7 @@ "source": { "extractorName": "ruby", "id": "ruby/parse-error", - "name": "Parse error" + "name": "Could not process some files due to syntax errors" }, "visibility": { "statusPage": true diff --git a/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected b/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected index e1d74aa4391..eb0264c2e58 100644 --- a/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected +++ b/ruby/ql/integration-tests/all-platforms/diagnostics/unknown-encoding/diagnostics.expected @@ -11,7 +11,7 @@ "source": { "extractorName": "ruby", "id": "ruby/unknown-character-encoding", - "name": "Unknown character encoding" + "name": "Could not process some files due to an unknown character encoding" }, "visibility": { "statusPage": true From fe34ec137858d356ca766e1bce165f3864b0a7db Mon Sep 17 00:00:00 2001 From: Arthur Baars Date: Wed, 15 Mar 2023 13:45:06 +0100 Subject: [PATCH 17/17] Ruby: fix formatting errors --- ruby/extractor/src/extractor.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ruby/extractor/src/extractor.rs b/ruby/extractor/src/extractor.rs index 6c85706dce7..1ef9a1edcca 100644 --- a/ruby/extractor/src/extractor.rs +++ b/ruby/extractor/src/extractor.rs @@ -253,9 +253,10 @@ impl<'a> Visitor<'a> { end_line, end_column, ); - let mut mesg = self - .diagnostics_writer - .new_entry("parse-error", "Could not process some files due to syntax errors"); + let mut mesg = self.diagnostics_writer.new_entry( + "parse-error", + "Could not process some files due to syntax errors", + ); &mesg .severity(diagnostics::Severity::Warning) .location(self.path, start_line, start_column, end_line, end_column) @@ -367,7 +368,10 @@ impl<'a> Visitor<'a> { self.record_parse_error( loc, self.diagnostics_writer - .new_entry("parse-error", "Could not process some files due to syntax errors") + .new_entry( + "parse-error", + "Could not process some files due to syntax errors", + ) .severity(diagnostics::Severity::Warning) .location(self.path, start_line, start_column, end_line, end_column) .message(