diff --git a/docs/query-help-style-guide.md b/docs/query-help-style-guide.md index 88b9844fc22..12f1b5c3f10 100644 --- a/docs/query-help-style-guide.md +++ b/docs/query-help-style-guide.md @@ -16,7 +16,7 @@ When you contribute a new [supported query](supported-queries.md) to this reposi ### Location and file name -Query help files must have the same base name as the query they describe and must be located in the same directory. +Query help files must have the same base name as the query they describe and must be located in the same directory. ### File structure and layout @@ -42,7 +42,6 @@ Section-level elements are used to group the information within the query help f For further information about the other section-level, block, list and table elements supported by query help files, see [Query help files](https://codeql.github.com/docs/writing-codeql-queries/query-help-files/) on codeql.github.com. - ## English style You should write the overview and recommendation elements in simple English that is easy to follow. You should: @@ -98,7 +97,6 @@ If you are citing an academic paper, we recommend adopting the reference style o >S. R. Chidamber and C. F. Kemerer, _A metrics suite for object-oriented design_. IEEE Transactions on Software Engineering, 20(6):476-493, 1994. - ### Websites If you are citing a website, please use the following format, without breadcrumb trails: @@ -154,13 +152,13 @@ later. For example, it's easy to see at a glance which part of the code is in th scope of an if statement, and adding more statements to the body of the if statement is less error-prone.

-

You should also ensure that the indentation of the code is consistent with the actual flow of +

You should also ensure that the indentation of the code is consistent with the actual flow of control, so that it does not confuse programmers.

-

In the example below, the original version of Cart is missing braces. This means +

In the example below, the original version of Cart is missing braces. This means that the code triggers a NullPointerException at runtime if i is null.