From 7fc78678feee57e3a0180e6f379e7cf4c6f57412 Mon Sep 17 00:00:00 2001 From: Nick Keers <94363953+nicholas-keers@users.noreply.github.com> Date: Fri, 30 Jun 2023 11:35:13 +0100 Subject: [PATCH] Update testing-custom-queries.md (#26278) Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com> --- .../testing-custom-queries.md | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) 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 a7999e4d9b76..de230bb87c8f 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