Skip to content

Commit a41ab43

Browse files
committed
test
1 parent ce561a1 commit a41ab43

File tree

1,285 files changed

+65111
-68182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,285 files changed

+65111
-68182
lines changed

.github/FUNDING.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
<<<<<<< HEAD
2-
version https://git-lfs.github.com/spec/v1
3-
oid sha256:788948116cc2cde18ab88bb20ccfba74462b1c5ca3bd1633b69f202d11bdfa06
4-
size 950
5-
=======
6-
# These are supported funding model platforms
7-
8-
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
9-
patreon: # Replace with a single Patreon username
10-
open_collective: # Replace with a single Open Collective username
11-
ko_fi: # Replace with a single Ko-fi username
12-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
13-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
14-
liberapay: # Replace with a single Liberapay username
15-
issuehunt: # Replace with a single IssueHunt username
16-
otechie: # Replace with a single Otechie username
17-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
18-
custom: ['https://gitee.com/samny/images/raw/master/53u47er53ec/53u47er53ec.png','https://img-blog.csdnimg.cn/20210208234545304.png','https://user-images.githubusercontent.com/47944478/115138300-d58b2200-a05d-11eb-8be8-6d7f141a9f45.png']
19-
20-
>>>>>>> 2922c58a68ebfd227bf7f28067abeae71562dca5
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13+
custom: ['https://gitee.com/samny/images/raw/master/53u47er53ec/53u47er53ec.png','https://img-blog.csdnimg.cn/20210208234545304.png','https://user-images.githubusercontent.com/47944478/115138300-d58b2200-a05d-11eb-8be8-6d7f141a9f45.png']
14+

CodeQL Queries/About CodeQL queries/README.md

Lines changed: 197 additions & 203 deletions
Large diffs are not rendered by default.

CodeQL Queries/About data flow analysis/README.md

Lines changed: 108 additions & 114 deletions
Large diffs are not rendered by default.

CodeQL Queries/Creating path queries/README.md

Lines changed: 210 additions & 216 deletions
Large diffs are not rendered by default.

CodeQL Queries/Defining the results of a query/README.md

Lines changed: 142 additions & 148 deletions
Large diffs are not rendered by default.
Lines changed: 49 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,49 @@
1-
<<<<<<< HEAD
2-
version https://git-lfs.github.com/spec/v1
3-
oid sha256:4affc64e35e048e88629818387b4196d798f9dcfa394d0605893a5f0215dae12
4-
size 7013
5-
=======
6-
# Metadata for CodeQL queries[](https://codeql.github.com/docs/writing-codeql-queries/metadata-for-codeql-queries/#metadata-for-codeql-queries)
7-
8-
Metadata tells users important information about CodeQL queries. You must include the correct query metadata in a query to be able to view query results in source code.
9-
10-
> 元数据告诉用户有关CodeQL查询的重要信息。您必须在查询中包含正确的查询元数据,才能在源代码中查看查询结果。
11-
12-
## About query metadata
13-
14-
Any query that is run as part of an analysis includes a number of properties, known as query metadata. Metadata is included at the top of each query file as the content of a QLDoc comment. This metadata tells LGTM and the CodeQL [extension for VS Code](https://codeql.github.com/docs/codeql-for-visual-studio-code/#codeql-for-visual-studio-code) how to handle the query and display its results correctly. It also gives other users information about what the query results mean. For more information on query metadata, see the [query metadata style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md) in our [open source repository](https://github.com/github/codeql) on GitHub.
15-
16-
> 作为分析的一部分运行的任何查询都包括一些属性,称为查询元数据。元数据作为QLDoc注释的内容包含在每个查询文件的顶部。这个元数据告诉LGTM和VS Code的CodeQL扩展如何处理查询并正确显示其结果。它还为其他用户提供了关于查询结果含义的信息。关于查询元数据的更多信息,请参见GitHub上开源仓库中的查询元数据样式指南。
17-
18-
> Note
19-
>
20-
> The exact metadata requirement depends on how you are going to run your query. For more information, see the section on query metadata in “[About CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/about-codeql-queries/).”
21-
>
22-
> 确切的元数据要求取决于你将如何运行你的查询。有关更多信息,请参阅 "关于CodeQL查询 "中关于查询元数据的部分。"
23-
24-
## Metadata properties
25-
26-
The following properties are supported by all query files:
27-
28-
| Property | Value | Description | 描述翻译 |
29-
| :------------------ | :---------------------------------------------------- | :----------------------------------------------------------- | ------------------------------------------------------------ |
30-
| `@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. | 一句话或一小段话,用来描述查询的目的以及为什么结果有用或重要。描述用纯文本书写,并使用单引号(')来括住代码元素。 |
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>`. | 一个由小写字母或数字组成的单词序列,以/或-为界,用于识别和分类查询。每个查询必须有一个唯一的ID。为了确保这一点,为每个ID使用一个固定的结构可能会有所帮助。例如,标准 LGTM 查询的格式如下。<language>/<brief-description>。 |
32-
| `@kind` | `problem``path-problem` | Identifies the query is an alert (`@kind problem`) or a path (`@kind path-problem`). For more information on these query types, see “[About CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/about-codeql-queries/).” | 识别查询是一个警报(@kind problem)还是一个路径(@kind path-problem)。关于这些查询类型的更多信息,请参阅 "关于CodeQL查询"。 |
33-
| `@name` | `<text>` | A statement that defines the label of the query. The name is written in plain text, and uses single quotes (`'`) to enclose code elements. | 定义查询标签的语句。名称用纯文本书写,并使用单引号(')来封闭代码元素。 |
34-
| `@tags` | `correctness``maintainability``readability``security` | These tags group queries together in broad categories to make it easier to search for them and identify them. In addition to the common tags listed here, there are also a number of more specific categories. For more information, see the [Query metadata style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md). | 这些标签将查询按大类分组,以便于搜索和识别。除了这里列出的常用标签外,还有一些更具体的类别。更多信息,请参阅查询元数据样式指南。 |
35-
| `@precision` | `low``medium``high``very-high` | Indicates the percentage of query results that are true positives (as opposed to false positive results). This, along with the `@problem.severity` property, determines whether the results are displayed by default on LGTM. | 表示查询结果中真阳性(与假阳性结果相反)的百分比。这与 @problem.s severity 属性一起,决定了结果是否在 LGTM 上默认显示。 |
36-
| `@problem.severity` | `error``warning``recommendation` | Defines the level of severity of any alerts generated by the query. This, along with the `@precision` property, determines whether the results are displayed by default on LGTM. | 定义了查询产生的任何警报的严重程度。这与 @precision 属性一起,决定了结果是否会在 LGTM 上默认显示。 |
37-
38-
## Additional properties for filter queries
39-
40-
Filter queries are used to define additional constraints to limit the results that are returned by other queries. A filter query must have the same `@kind` property as the query whose results it is filtering. No additional metadata properties are required.
41-
42-
> 过滤器查询用于定义额外的约束条件,以限制其他查询返回的结果。过滤器查询必须与它所过滤的结果的查询具有相同的@kind属性。不需要额外的元数据属性。
43-
44-
## Example
45-
46-
Here is the metadata for one of the standard Java queries:
47-
48-
> 下面是其中一个标准Java查询的元数据:
49-
50-
![image0](https://gitee.com/samny/images/raw/master/9u21er9ec/9u21er9ec.png)
51-
52-
For more examples of query metadata, see the standard CodeQL queries in our [GitHub repository](https://github.com/github/codeql).
53-
54-
> 关于查询元数据的更多例子,请参见我们GitHub仓库中的标准CodeQL查询。
55-
>>>>>>> 2922c58a68ebfd227bf7f28067abeae71562dca5
1+
# Metadata for CodeQL queries[](https://codeql.github.com/docs/writing-codeql-queries/metadata-for-codeql-queries/#metadata-for-codeql-queries)
2+
3+
Metadata tells users important information about CodeQL queries. You must include the correct query metadata in a query to be able to view query results in source code.
4+
5+
> 元数据告诉用户有关CodeQL查询的重要信息。您必须在查询中包含正确的查询元数据,才能在源代码中查看查询结果。
6+
7+
## About query metadata
8+
9+
Any query that is run as part of an analysis includes a number of properties, known as query metadata. Metadata is included at the top of each query file as the content of a QLDoc comment. This metadata tells LGTM and the CodeQL [extension for VS Code](https://codeql.github.com/docs/codeql-for-visual-studio-code/#codeql-for-visual-studio-code) how to handle the query and display its results correctly. It also gives other users information about what the query results mean. For more information on query metadata, see the [query metadata style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md) in our [open source repository](https://github.com/github/codeql) on GitHub.
10+
11+
> 作为分析的一部分运行的任何查询都包括一些属性,称为查询元数据。元数据作为QLDoc注释的内容包含在每个查询文件的顶部。这个元数据告诉LGTM和VS Code的CodeQL扩展如何处理查询并正确显示其结果。它还为其他用户提供了关于查询结果含义的信息。关于查询元数据的更多信息,请参见GitHub上开源仓库中的查询元数据样式指南。
12+
13+
> Note
14+
>
15+
> The exact metadata requirement depends on how you are going to run your query. For more information, see the section on query metadata in “[About CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/about-codeql-queries/).”
16+
>
17+
> 确切的元数据要求取决于你将如何运行你的查询。有关更多信息,请参阅 "关于CodeQL查询 "中关于查询元数据的部分。"
18+
19+
## Metadata properties
20+
21+
The following properties are supported by all query files:
22+
23+
| Property | Value | Description | 描述翻译 |
24+
| :------------------ | :---------------------------------------------------- | :----------------------------------------------------------- | ------------------------------------------------------------ |
25+
| `@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. | 一句话或一小段话,用来描述查询的目的以及为什么结果有用或重要。描述用纯文本书写,并使用单引号(')来括住代码元素。 |
26+
| `@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>`. | 一个由小写字母或数字组成的单词序列,以/或-为界,用于识别和分类查询。每个查询必须有一个唯一的ID。为了确保这一点,为每个ID使用一个固定的结构可能会有所帮助。例如,标准 LGTM 查询的格式如下。<language>/<brief-description>。 |
27+
| `@kind` | `problem``path-problem` | Identifies the query is an alert (`@kind problem`) or a path (`@kind path-problem`). For more information on these query types, see “[About CodeQL queries](https://codeql.github.com/docs/writing-codeql-queries/about-codeql-queries/).” | 识别查询是一个警报(@kind problem)还是一个路径(@kind path-problem)。关于这些查询类型的更多信息,请参阅 "关于CodeQL查询"。 |
28+
| `@name` | `<text>` | A statement that defines the label of the query. The name is written in plain text, and uses single quotes (`'`) to enclose code elements. | 定义查询标签的语句。名称用纯文本书写,并使用单引号(')来封闭代码元素。 |
29+
| `@tags` | `correctness``maintainability``readability``security` | These tags group queries together in broad categories to make it easier to search for them and identify them. In addition to the common tags listed here, there are also a number of more specific categories. For more information, see the [Query metadata style guide](https://github.com/github/codeql/blob/main/docs/query-metadata-style-guide.md). | 这些标签将查询按大类分组,以便于搜索和识别。除了这里列出的常用标签外,还有一些更具体的类别。更多信息,请参阅查询元数据样式指南。 |
30+
| `@precision` | `low``medium``high``very-high` | Indicates the percentage of query results that are true positives (as opposed to false positive results). This, along with the `@problem.severity` property, determines whether the results are displayed by default on LGTM. | 表示查询结果中真阳性(与假阳性结果相反)的百分比。这与 @problem.s severity 属性一起,决定了结果是否在 LGTM 上默认显示。 |
31+
| `@problem.severity` | `error``warning``recommendation` | Defines the level of severity of any alerts generated by the query. This, along with the `@precision` property, determines whether the results are displayed by default on LGTM. | 定义了查询产生的任何警报的严重程度。这与 @precision 属性一起,决定了结果是否会在 LGTM 上默认显示。 |
32+
33+
## Additional properties for filter queries
34+
35+
Filter queries are used to define additional constraints to limit the results that are returned by other queries. A filter query must have the same `@kind` property as the query whose results it is filtering. No additional metadata properties are required.
36+
37+
> 过滤器查询用于定义额外的约束条件,以限制其他查询返回的结果。过滤器查询必须与它所过滤的结果的查询具有相同的@kind属性。不需要额外的元数据属性。
38+
39+
## Example
40+
41+
Here is the metadata for one of the standard Java queries:
42+
43+
> 下面是其中一个标准Java查询的元数据:
44+
45+
![image0](https://gitee.com/samny/images/raw/master/9u21er9ec/9u21er9ec.png)
46+
47+
For more examples of query metadata, see the standard CodeQL queries in our [GitHub repository](https://github.com/github/codeql).
48+
49+
> 关于查询元数据的更多例子,请参见我们GitHub仓库中的标准CodeQL查询。

0 commit comments

Comments
 (0)