diff --git a/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases.md b/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases.md index 1d140e1913..c4358c2fe1 100644 --- a/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases.md +++ b/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases.md @@ -406,7 +406,7 @@ steps: You can check if a repository has any {% data variables.product.prodname_codeql %} databases available for download using the `/repos///code-scanning/codeql/databases` endpoint. For example, to check for {% data variables.product.prodname_codeql %} databases using the [{% data variables.product.prodname_cli %}](https://cli.github.com/manual/gh_api) you would run: ``` -gh api /repos///code-scanning/codeql/databases/ +gh api /repos///code-scanning/codeql/databases ``` This command returns information about any {% data variables.product.prodname_codeql %} databases that are available for a repository, including the language the database represents, and when the database was last updated. If no {% data variables.product.prodname_codeql %} databases are available, the response is empty. diff --git a/content/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries.md b/content/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries.md index a7999e4d9b..de230bb87c 100644 --- a/content/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries.md +++ b/content/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries.md @@ -157,25 +157,23 @@ which is declared as a dependency for `my-query-tests`. Therefore, `EmptyThen.ql 1. Create a code snippet to test. The following Java code contains an empty `if` statement on the third line. Save it in `custom-queries/java/tests/EmptyThen/Test.java`. - ```java - -class Test { - public void problem(String arg) { - if (arg.isEmpty()) - ; - { - System.out.println("Empty argument"); + ```java + class Test { + public void problem(String arg) { + if (arg.isEmpty()) + ; + { + System.out.println("Empty argument"); + } + } + + public void good(String arg) { + if (arg.isEmpty()) { + System.out.println("Empty argument"); + } } } - - public void good(String arg) { - if (arg.isEmpty()) { - System.out.println("Empty argument"); - } - } -} - - ``` + ``` ### Execute the test