mirror of
https://github.com/github/codeql.git
synced 2026-02-18 16:03:45 +01:00
fix find and replace error
This commit is contained in:
@@ -21,7 +21,7 @@ files and directories within the pack should be logically organized. For example
|
||||
- Queries are organized into directories for specific categories.
|
||||
- Queries for specific products, libraries, and frameworks are organized into
|
||||
their own top-level directories.
|
||||
- There is a top-level directory named ``<owner>/<ql-language-specification>`` for query library
|
||||
- There is a top-level directory named ``<owner>/<language>`` for query library
|
||||
(``.qll``) files. Within this directory, ``.qll`` files should be organized into
|
||||
subdirectories for specific categories.
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ The starter workspace is a Git repository. It contains:
|
||||
|
||||
* The `repository of CodeQL libraries and queries <https://github.com/github/codeql>`__ for C/C++, C#, Java, JavaScript, and Python. This is included as a submodule, so it can be updated without affecting your custom queries.
|
||||
* The `repository of CodeQL libraries and queries <https://github.com/github/codeql-go>`__ for Go. This is also included as a submodule.
|
||||
* A series of folders named ``codeql-custom-queries-<ql-language-specification>``. These are ready for you to start developing your own custom queries for each language, using the standard libraries. There are some example queries to get you started.
|
||||
* A series of folders named ``codeql-custom-queries-<language>``. These are ready for you to start developing your own custom queries for each language, using the standard libraries. There are some example queries to get you started.
|
||||
|
||||
To use the starter workspace:
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ For C/C++, C#, Java, and JavaScript you should use the following template::
|
||||
* ...
|
||||
*/
|
||||
|
||||
import <ql-language-specification>
|
||||
import <language>
|
||||
import DataFlow::PathGraph
|
||||
...
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ There is too much information to search through by hand, so you decide to use yo
|
||||
|
||||
#. Open the `query console on LGTM.com <https://lgtm.com/query>`__ to get started.
|
||||
#. Select a language and a demo project. For this tutorial, any language and project will do.
|
||||
#. Delete the default code ``import <ql-language-specification> select "hello world"``.
|
||||
#. Delete the default code ``import <language> select "hello world"``.
|
||||
|
||||
QL libraries
|
||||
------------
|
||||
|
||||
@@ -23,7 +23,7 @@ Once you have selected a language, the query console is populated with the query
|
||||
|
||||
.. code-block:: ql
|
||||
|
||||
import <ql-language-specification>
|
||||
import <language>
|
||||
|
||||
select "hello world"
|
||||
|
||||
@@ -124,7 +124,7 @@ The following example queries *do* use these databases and give you an idea of h
|
||||
Queries using the CodeQL libraries can find errors and uncover variants of important security vulnerabilities in codebases.
|
||||
Visit `GitHub Security Lab <https://securitylab.github.com/>`__ to read about examples of vulnerabilities that we have recently found in open source projects.
|
||||
|
||||
To import the CodeQL library for a specific programming language, type ``import <ql-language-specification>`` at the start of the query.
|
||||
To import the CodeQL library for a specific programming language, type ``import <language>`` at the start of the query.
|
||||
|
||||
.. code-block:: ql
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ The following properties are supported by all query files:
|
||||
+=======================+===========================+=======================================================================================================================================================================================================================================================================================================================================================================+
|
||||
| ``@description`` | ``<text>`` | A sentence or short paragraph to describe the purpose of the query and *why* the result is useful or important. The description is written in plain text, and uses single quotes (``'``) to enclose code elements. |
|
||||
+-----------------------+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``@id`` | ``<text>`` | A sequence of words composed of lowercase letters or digits, delimited by ``/`` or ``-``, identifying and classifying the query. Each query must have a **unique** ID. To ensure this, it may be helpful to use a fixed structure for each ID. For example, the standard LGTM queries have the following format: ``<ql-language-specification>/<brief-description>``. |
|
||||
| ``@id`` | ``<text>`` | A sequence of words composed of lowercase letters or digits, delimited by ``/`` or ``-``, identifying and classifying the query. Each query must have a **unique** ID. To ensure this, it may be helpful to use a fixed structure for each ID. For example, the standard LGTM queries have the following format: ``<language>/<brief-description>``. |
|
||||
+-----------------------+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| ``@kind`` | | ``problem`` | Identifies the query is an alert (``@kind problem``) or a path (``@kind path-problem``). For more information on these query types, see ":doc:`About CodeQL queries <about-codeql-queries>`." |
|
||||
| | | ``path-problem`` | |
|
||||
|
||||
Reference in New Issue
Block a user