Skip to content

Commit e5ef0e3

Browse files
authored
Merge pull request #4813 from github/replace-language
[docs] Fix find and replace error
2 parents 9bec9b4 + b9c8818 commit e5ef0e3

File tree

7 files changed

+135
-70
lines changed

7 files changed

+135
-70
lines changed

docs/codeql/codeql-cli/about-ql-packs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ files and directories within the pack should be logically organized. For example
2121
- Queries are organized into directories for specific categories.
2222
- Queries for specific products, libraries, and frameworks are organized into
2323
their own top-level directories.
24-
- There is a top-level directory named ``<owner>/<ql-language-specification>`` for query library
24+
- There is a top-level directory named ``<owner>/<language>`` for query library
2525
(``.qll``) files. Within this directory, ``.qll`` files should be organized into
2626
subdirectories for specific categories.
2727

docs/codeql/codeql-for-visual-studio-code/setting-up-codeql-in-visual-studio-code.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ The starter workspace is a Git repository. It contains:
8080

8181
* 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.
8282
* The `repository of CodeQL libraries and queries <https://github.com/github/codeql-go>`__ for Go. This is also included as a submodule.
83-
* 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.
83+
* 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.
8484

8585
To use the starter workspace:
8686

docs/codeql/index.html

Lines changed: 128 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<!DOCTYPE html>
22
<html lang="en">
3+
34
<head>
45
<title>CodeQL documentation</title>
56
<meta name="viewport" content="width=device-width, initial-scale=1" />
67
<link rel="stylesheet" href="_static/primer.css" />
78
</head>
9+
810
<body>
911
<div class="Header">
1012
<div class="Header-item--full">
@@ -20,7 +22,8 @@
2022
</a>
2123
</div>
2224
<div class="Header-item hide-sm hide-md">
23-
<script src="https://addsearch.com/js/?key=93b4d287e2fc079a4089412b669785d5&categories=!0xhelp.semmle.com,0xcodeql.github.com,1xdocs"></script>
25+
<script
26+
src="https://addsearch.com/js/?key=93b4d287e2fc079a4089412b669785d5&categories=!0xhelp.semmle.com,0xcodeql.github.com,1xdocs,1xcodeql-query-help,1xcodeql-standard-libraries"></script>
2427
</div>
2528
<div class="Header-item">
2629
<details class="dropdown details-reset details-overlay d-inline-block">
@@ -72,82 +75,140 @@ <h1>CodeQL documentation</h1>
7275
vulnerability, eradicating it forever. Then share your query to help others do the same.</p>
7376
</div>
7477
<div class="d-flex flex-column flex-md-row flex-justify-center">
75-
<div class="Box col-lg-3 col-sm-12">
76-
<a href="codeql-overview">
77-
<div class="Box-header">
78-
<h3 class="Box-title">
79-
CodeQL overview
80-
</h3>
81-
</div>
82-
</a>
83-
<div class="Box-body border-bottom-0">
84-
Learn more about how CodeQL works, the languages and libraries supported by CodeQL analysis, and the tools you can use to run CodeQL on open source projects.
85-
</div>
86-
</div>
87-
<div class="Box col-lg-3 col-sm-12">
88-
<div class="Box-header">
89-
<a href="codeql-overview/codeql-tools">
90-
<h3 class="Box-title">
91-
CodeQL tools
92-
</h3>
93-
</a>
78+
<div class="Box col-lg-5 col-sm-12 border-0">
79+
80+
<div class="Box-header border-0 bg-white">
81+
<h3 class="Box-title text-mono f3 text-center">
82+
BACKGROUND INFORMATION
83+
</h3>
9484
</div>
9585
<div class="Box-body border-bottom-0">
96-
GitHub provides the <a href ="codeql-cli">CodeQL command-line interface</a> and <a href="codeql-for-visual-studio-code">CodeQL for Visual Studio Code</a> for performing
97-
CodeQL analysis on open source codebases.
86+
<div class="Subhead border-0">
87+
<a href="codeql-overview/about-codeql">
88+
<div class="Subhead-heading f4 text-center">About CodeQL</div>
89+
</a>
90+
<div class="Subhead-description">Learn more about how CodeQL works...</div>
91+
</div>
92+
<div class="Subhead border-0">
93+
<a href="codeql-overview/supported-languages-and-frameworks/">
94+
<div class="Subhead-heading f4 text-center">Supported languages and frameworks</div>
95+
</a>
96+
<div class="Subhead-description">View the languages, libraries, and frameworks supported in the
97+
latest version of CodeQL...</div>
98+
</div>
99+
<div class="Subhead border-0">
100+
<a href="../publications">
101+
<div class="Subhead-heading f4 text-center">Academic publications</div>
102+
</a>
103+
<div class="Subhead-description">Read academic articles published by the team behind CodeQL...
104+
</div>
105+
</div>
106+
98107
</div>
99108
</div>
100-
<div class="Box col-lg-3 col-sm-12">
101-
<div class="Box-header">
102-
<a
103-
href="https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/about-code-scanning">
104-
<h3 class="Box-title">
105-
Code scanning with CodeQL
106-
</h3>
107-
</a>
109+
<div class="Box col-lg-5 col-sm-12 border-0">
110+
<div class="Box-header border-0 bg-white">
111+
<h3 class="Box-title text-mono f3 text-center">
112+
CODEQL TOOLS
113+
</h3>
108114
</div>
109115
<div class="Box-body border-bottom-0">
110-
You can use code scanning with CodeQL to analyze the code in a GitHub repository to find security
111-
vulnerabilities and coding errors. Any problems identified by the analysis are shown in GitHub
116+
<div class="Subhead border-0">
117+
<a href="codeql-cli">
118+
<div class="Subhead-heading f4 text-center">CodeQL CLI</div>
119+
</a>
120+
<div class="Subhead-description border-bottom-0">The CodeQL command-line interface (CLI) is used
121+
to create
122+
databases for security research....</div>
123+
</div>
124+
<div class="Subhead border-0">
125+
<a href="codeql-for-visual-studio-code">
126+
<div class="Subhead-heading f4 text-center">CodeQL for Visual Studio Code</div>
127+
</a>
128+
<div class="Subhead-description">CodeQL for Visual Studio Code adds rich language
129+
support for CodeQL...</div>
130+
</div>
131+
<div class="Subhead border-0">
132+
<a
133+
href="https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/about-code-scanning">
134+
<div class="Subhead-heading f4 text-center">Code scanning with CodeQL</div>
135+
</a>
136+
<div class="Subhead-description">Use code scanning with CodeQL to analyze the code in a GitHub
137+
repository to find
138+
security
139+
vulnerabilities...</div>
140+
</div>
141+
112142
</div>
113143
</div>
144+
145+
146+
147+
148+
</div>
114149
</div>
150+
151+
152+
115153
<div class="d-flex flex-column flex-md-row flex-justify-center">
116-
<div class="Box col-lg-3 col-sm-12">
117-
<div class="Box-header">
118-
119-
<h3 class="Box-title text-blue">
120-
CodeQL guides
121-
</h3>
122-
123-
</div>
124-
<div class="Box-body border-bottom-0">
125-
Learn more about CodeQL queries in <a href="writing-codeql-queries">Writing CodeQL queries</a> and find information about writing queries to analyze specific languages in the <a href="codeql-language-guides">CodeQL language guides</a>.
126-
</div>
127-
</div>
128-
<div class="Box col-lg-3 col-sm-12">
129-
<div class="Box-header">
130-
<h3 class="Box-title text-blue">
131-
CodeQL reference documentation
132-
</h3>
133-
</div>
134154

155+
<div class="Box col-lg-5 col-sm-12 border-0">
156+
<div class="Box-header border-0 bg-white">
157+
<h3 class="Box-title text-mono f3 text-center">
158+
CODEQL GUIDES
159+
</h3>
160+
</div>
135161
<div class="Box-body border-bottom-0">
136-
Finds details of the predicates, modules, and classes included with CodeQL in the <a href="../codeql-standard-libraries">CodeQL standard libraries</a> and explore the documentation for the CodeQL queries in the <a href="../codeql-query-help">CodeQL query help</a>.
162+
<div class="Subhead border-0">
163+
<a href="writing-codeql-queries">
164+
<div class="Subhead-heading f4 text-center">Writing CodeQL queries</div>
165+
</a>
166+
<div class="Subhead-description">Get to know more about queries and learn some key
167+
query-writing skills by solving puzzles.....</div>
168+
</div>
169+
<div class="Subhead border-0">
170+
<a href="codeql-language-guides">
171+
<div class="Subhead-heading f4 text-center">CodeQL language guides</div>
172+
</a>
173+
<div class="Subhead-description">Experiment and learn how to write effective and efficient
174+
queries for CodeQL databases generated from the languages supported in CodeQL
175+
analysis...</div>
176+
</div>
137177
</div>
138178
</div>
139-
<div class="Box col-lg-3 col-sm-12">
140-
<a href="ql-language-reference">
141-
<div class="Box-header">
142-
<h3 class="Box-title">
143-
QL language reference
144-
</h3>
145-
</div>
146-
</a>
179+
<div class="Box col-lg-5 col-sm-12 border-0">
180+
<div class="Box-header border-0 bg-white">
181+
<h3 class="Box-title text-mono f3 text-center">
182+
CODEQL REFERENCE DOCS
183+
</h3>
184+
</div>
147185
<div class="Box-body border-bottom-0">
148-
Learn all about QL, the powerful query language that underlies the code scanning tool CodeQL.
186+
<div class="Subhead border-0">
187+
<div class="Subhead border-0">
188+
<a href="ql-language-reference">
189+
<div class="Subhead-heading f4 text-center">QL language reference</div>
190+
</a>
191+
<div class="Subhead-description">Learn all about QL, the powerful query language that
192+
underlies the code scanning tool CodeQL...
193+
</div>
194+
</div>
195+
<a href="../codeql-standard-libraries">
196+
<div class="Subhead-heading f4 text-center">CodeQL standard libraries</div>
197+
</a>
198+
<div class="Subhead-description">Find details of the predicates, modules, and classes
199+
included with CodeQL...</div>
200+
</div>
201+
<div class="Subhead border-0">
202+
<a href="../codeql-query-help">
203+
<div class="Subhead-heading f4 text-center">CodeQL query help</div>
204+
</a>
205+
<div class="Subhead-description">View the query help for the queries included in the code
206+
scanning query suites...</div>
207+
</div>
208+
149209
</div>
150210
</div>
211+
151212
</div>
152213
</article>
153214
<div class="footer mt-6 bg-gray-light border-y border-gray-dark no-print">
@@ -288,11 +349,15 @@ <h4 class="mb-3 text-mono text-gray-light text-normal">Company</h4>
288349
</ul>
289350
<ul class="list-style-none d-flex text-gray">
290351
<li class="mr-3">&copy; 2020 GitHub, Inc.</li>
291-
<li class="mr-3"><a href="https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-terms-of-service" class="link-gray">Terms </a></li>
292-
<li><a href="https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-privacy-statement" class="link-gray">Privacy </a></li>
352+
<li class="mr-3"><a
353+
href="https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-terms-of-service"
354+
class="link-gray">Terms </a></li>
355+
<li><a href="https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-privacy-statement"
356+
class="link-gray">Privacy </a></li>
293357
</ul>
294358
</div>
295359
</div>
296360
</div>
297361
</body>
298-
</html>
362+
363+
</html>

docs/codeql/writing-codeql-queries/creating-path-queries.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ For C/C++, C#, Java, and JavaScript you should use the following template::
5252
* ...
5353
*/
5454

55-
import <ql-language-specification>
55+
import <language>
5656
import DataFlow::PathGraph
5757
...
5858

docs/codeql/writing-codeql-queries/find-the-thief.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ There is too much information to search through by hand, so you decide to use yo
5050

5151
#. Open the `query console on LGTM.com <https://lgtm.com/query>`__ to get started.
5252
#. Select a language and a demo project. For this tutorial, any language and project will do.
53-
#. Delete the default code ``import <ql-language-specification> select "hello world"``.
53+
#. Delete the default code ``import <language> select "hello world"``.
5454

5555
QL libraries
5656
------------

docs/codeql/writing-codeql-queries/introduction-to-ql.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Once you have selected a language, the query console is populated with the query
2323

2424
.. code-block:: ql
2525
26-
import <ql-language-specification>
26+
import <language>
2727
2828
select "hello world"
2929
@@ -124,7 +124,7 @@ The following example queries *do* use these databases and give you an idea of h
124124
Queries using the CodeQL libraries can find errors and uncover variants of important security vulnerabilities in codebases.
125125
Visit `GitHub Security Lab <https://securitylab.github.com/>`__ to read about examples of vulnerabilities that we have recently found in open source projects.
126126

127-
To import the CodeQL library for a specific programming language, type ``import <ql-language-specification>`` at the start of the query.
127+
To import the CodeQL library for a specific programming language, type ``import <language>`` at the start of the query.
128128

129129
.. code-block:: ql
130130

docs/codeql/writing-codeql-queries/metadata-for-codeql-queries.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The following properties are supported by all query files:
2828
+=======================+===========================+=======================================================================================================================================================================================================================================================================================================================================================================+
2929
| ``@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. |
3030
+-----------------------+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
31-
| ``@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>``. |
31+
| ``@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>``. |
3232
+-----------------------+---------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
3333
| ``@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>`." |
3434
| | | ``path-problem`` | |

0 commit comments

Comments
 (0)