Fix for blank lines around code fences (#38255)
This commit is contained in:
@@ -240,6 +240,7 @@ The following examples are designed to give you an idea of some of the build com
|
||||
```
|
||||
codeql database create -l swift -c "./scripts/build.sh" swift-database
|
||||
```
|
||||
|
||||
{% endif %}
|
||||
|
||||
- Project built using Bazel:
|
||||
|
||||
@@ -51,6 +51,7 @@ files:
|
||||
```
|
||||
- query: <path-to-query>
|
||||
```
|
||||
|
||||
The argument must be one or more file paths, relative to the {% data variables.product.prodname_codeql %} pack containing
|
||||
the suite definition.
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ To analyze a {% data variables.product.prodname_codeql %} database with a {% dat
|
||||
```
|
||||
codeql database analyze <database> <scope>/<pack>@x.x.x:<path>
|
||||
```
|
||||
|
||||
- `<database>`: the {% data variables.product.prodname_codeql %} database to be analyzed.
|
||||
- `<scope>`: the name of the {% data variables.product.prodname_dotcom %} organization that the pack is published to.
|
||||
- `<pack>`: the name for the pack that you are using.
|
||||
@@ -110,14 +111,18 @@ It can also be assumed that a pack published by the _latest_ public release of {
|
||||
As an exception to the above, packs published with versions of {% data variables.product.prodname_codeql %} _earlier than 2.12.0_ are not compatible with any earlier or later versions. These old versions did not write pre-compiled queries in a format that supported compatibility between releases. Packs published by these versions can still be _used_ by newer versions, but the analysis will be slower because the queries have to be recompiled first.
|
||||
|
||||
As a user of a published query pack, you can check that the {% data variables.product.prodname_codeql %} makes use of the precompiled queries in it by inspecting the terminal output from an analysis runs that uses the query pack. If it contains lines looking like the following, then the precompiled queries were used successfully:
|
||||
|
||||
```
|
||||
[42/108] Loaded /long/path/to/query/Filename.qlx.
|
||||
```
|
||||
|
||||
However, if they instead look like the following, then usage of the precompiled queries failed:
|
||||
|
||||
```
|
||||
Compiling query plan for /long/path/to/query/Filename.ql.
|
||||
[42/108 comp 25s] Compiled /long/path/to/query/Filename.ql.
|
||||
```
|
||||
|
||||
The results of the analysis will still be good in this case, but to get optimal performance you may need to upgrade to a newer version of the {% data variables.product.prodname_codeql %} CLI and/or of the query pack.
|
||||
|
||||
If you publish query packs on the {% data variables.product.prodname_container_registry %} on {% data variables.product.prodname_dotcom_the_website %} for others to use, we recommend that you use a recent release of {% data variables.product.prodname_codeql %} to run `codeql pack publish`, and that you publish a fresh version of your pack with an updated {% data variables.product.prodname_codeql %} version before the version you used turns 6 months old. That way you can ensure that users of your pack who keep _their_ {% data variables.product.prodname_codeql %} up to date will benefit from the pre-compiled queries in your pack.
|
||||
|
||||
@@ -158,6 +158,7 @@ which is declared as a dependency for `my-query-tests`. Therefore, `EmptyThen.ql
|
||||
8. 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())
|
||||
@@ -173,6 +174,7 @@ class Test {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Execute the test
|
||||
@@ -211,7 +213,9 @@ query.
|
||||
In this case, the failure was expected and is easy to fix. If you open the `EmptyThen.actual` file, you can see the results of the test:
|
||||
|
||||
```
|
||||
|
||||
| Test.java:3:5:3:22 | stmt | This if statement has an empty then. |
|
||||
|
||||
```
|
||||
|
||||
This file contains a table, with a column for the location of the result,
|
||||
|
||||
Reference in New Issue
Block a user