mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Update style guides for name change
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
# QL Style Guide
|
# CodeQL style guide
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
This document describes how to format the QL code you contribute to this repository. It covers aspects such as layout, white-space, naming, and documentation. Adhering to consistent standards makes code easier to read and maintain. Of course, these are only guidelines, and can be overridden as the need arises on a case-by-case basis. Where existing code deviates from these guidelines, prefer consistency with the surrounding code.
|
This document describes how to format the code you contribute to this repository. It covers aspects such as layout, white-space, naming, and documentation. Adhering to consistent standards makes code easier to read and maintain. Of course, these are only guidelines, and can be overridden as the need arises on a case-by-case basis. Where existing code deviates from these guidelines, prefer consistency with the surrounding code.
|
||||||
Note, if you use QL for Eclipse, you can auto-format your query in the [QL editor](https://help.semmle.com/ql-for-eclipse/Content/WebHelp/ql-editor.html).
|
Note, if you use QL for Eclipse, you can auto-format your query in the [QL editor](https://help.semmle.com/ql-for-eclipse/Content/WebHelp/ql-editor.html).
|
||||||
|
|
||||||
Words in *italic* are defined in the [Glossary](#glossary).
|
Words in *italic* are defined in the [Glossary](#glossary).
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# Query file metadata and alert message style guide
|
# Query file metadata and alert message style guide
|
||||||
|
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
This document outlines the structure of Semmle query files. You should adopt this structure when contributing custom queries to this repository, in order to ensure that new queries are consistent with the standard Semmle queries.
|
This document outlines the structure of Semmle query files. You should adopt this structure when contributing custom queries to this repository, in order to ensure that new queries are consistent with the standard Semmle queries.
|
||||||
@@ -11,13 +10,13 @@ Query files have the extension `.ql`. Each file has two distinct areas:
|
|||||||
|
|
||||||
* Metadata area–displayed at the top of the file, contains the metadata that defines how results for the query are interpreted and gives a brief description of the purpose of the query.
|
* Metadata area–displayed at the top of the file, contains the metadata that defines how results for the query are interpreted and gives a brief description of the purpose of the query.
|
||||||
* Query definition–defined using QL. The query includes a select statement, which defines the content and format of the results. For further information about writing QL, see the following topics:
|
* Query definition–defined using QL. The query includes a select statement, which defines the content and format of the results. For further information about writing QL, see the following topics:
|
||||||
* [Learning QL](https://help.semmle.com/QL/learn-ql/index.html)
|
* [Learning CodeQL](https://help.semmle.com/QL/learn-ql/index.html)
|
||||||
* [QL language handbook](https://help.semmle.com/QL/ql-handbook/index.html)
|
* [QL language handbook](https://help.semmle.com/QL/ql-handbook/index.html)
|
||||||
* [QL language specification](https://help.semmle.com/QL/ql-spec/language.html)
|
* [QL language specification](https://help.semmle.com/QL/ql-spec/language.html)
|
||||||
* [QL style guide](https://github.com/Semmle/ql/blob/master/docs/ql-style-guide.md)
|
* [QL style guide](https://github.com/Semmle/ql/blob/master/docs/ql-style-guide.md)
|
||||||
|
|
||||||
|
|
||||||
For examples of query files for the languages supported by Semmle, visit the following links:
|
For examples of query files for the languages supported by CodeQL, visit the following links:
|
||||||
|
|
||||||
* [C/C++ queries](https://help.semmle.com/wiki/display/CCPPOBJ/)
|
* [C/C++ queries](https://help.semmle.com/wiki/display/CCPPOBJ/)
|
||||||
* [C# queries](https://help.semmle.com/wiki/display/CSHARP/)
|
* [C# queries](https://help.semmle.com/wiki/display/CSHARP/)
|
||||||
@@ -178,4 +177,4 @@ For examples of select clauses and alert messages, see the query source files at
|
|||||||
* [JavaScript queries](https://help.semmle.com/wiki/display/JS/)
|
* [JavaScript queries](https://help.semmle.com/wiki/display/JS/)
|
||||||
* [Python queries](https://help.semmle.com/wiki/display/PYTHON/)
|
* [Python queries](https://help.semmle.com/wiki/display/PYTHON/)
|
||||||
|
|
||||||
For further information on query writing, see [Writing QL queries](https://help.semmle.com/QL/learn-ql/ql/writing-queries/writing-queries.html). For more information on learning QL, see [Learning QL](https://help.semmle.com/QL/learn-ql/index.html).
|
For further information on query writing, see [Writing CodeQL queries](https://help.semmle.com/QL/learn-ql/ql/writing-queries/writing-queries.html). For more information on learning CodeQL, see [Learning CodeQL](https://help.semmle.com/QL/learn-ql/index.html).
|
||||||
|
|||||||
Reference in New Issue
Block a user