You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/code-security/codeql-cli/using-the-codeql-cli/testing-custom-queries.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,7 @@ other custom queries. For example, `custom-queries/java/queries/EmptyThen.ql`.
143
143
144
144
1. Create a {% data variables.product.prodname_codeql %} pack for your Java tests by adding a `qlpack.yml` file with the following contents to `custom-queries/java/tests`, updating the `dependencies` to match the name of your {% data variables.product.prodname_codeql %} pack of custom queries:
1. Run `codeql pack install` in the root of the test directory. This generates a `codeql-pack.lock.yml` file that specifies all of the transitive dependencies required to run queries in this pack.
149
149
@@ -166,7 +166,7 @@ which is declared as a dependency for `my-query-tests`. Therefore, `EmptyThen.ql
Copy file name to clipboardExpand all lines: contributing/content-style-guide.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,6 +137,8 @@ In YAML examples, such as actions and workflow files, use two spaces to indent l
137
137
python-version: {% raw %}${{ matrix.python }}{% endraw %}
138
138
```
139
139
140
+
To indent reusables, see [`data/reusables/README.md`](/data/reusables/README.md).
141
+
140
142
### Scheduled workflows
141
143
142
144
Workflow runs are delayed when too many workflows run at once. Since many users copy code from the GitHub docs, we should use examples that guide users away from congested times.
@@ -151,7 +153,7 @@ Use italics to emphasize words or parts of a sentence. Use emphasis sparingly fo
151
153
152
154
-**Use:**_Fine-grained personal access tokens_ have several security advantages over personal access tokens (classic).
153
155
-**Use:**_For types of packages other than containers_, to the right of the package version click **Delete**.
154
-
-**Avoid:** Next to _**Title**_, add a descriptive label for your new key.
156
+
-**Avoid:** Next to _**Title**_, add a descriptive label for your new key.
155
157
156
158
## Footnotes
157
159
@@ -893,7 +895,7 @@ For example, in "[Autoscaling with self hosted runners](https://docs.github.com/
893
895
894
896
### Use proper markup for row and column headers
895
897
896
-
Tables in which the first column describes the data values in the table (but is not data itself) need to be marked up with row headers. This is important for assistive technology to understand relationships between cells.
898
+
Tables in which the first column describes the data values in the table (but is not data itself) need to be marked up with row headers. This is important for assistive technology to understand relationships between cells.
897
899
898
900
For example in the following table, in order to make sense of the "Yes" and "No" values in the table, you need to know both the column header (role) and row header (permission).
899
901
@@ -955,11 +957,11 @@ See "[Footnotes](https://github.com/github/docs/blob/main/contributing/content-s
955
957
956
958
### Align table content consistently
957
959
958
-
All columns in a table should be left-aligned, except for columns containing only octicons which should be center-aligned. If a column contains both text and octicons, use center alignment.
960
+
All columns in a table should be left-aligned, except for columns containing only octicons which should be center-aligned. If a column contains both text and octicons, use center alignment.
959
961
960
962
Table content is left-aligned by default. Use Markdown table formatting, colons (`:`) to either the right or left of the dashes in the header row, to specify the alignment of each column. Read "[Organizing information with tables](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-tables#formatting-content-within-your-table)" for more information.
961
963
962
-
The following example shows part of a table from "[Configuration options for the dependabot.yml file](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file)".
964
+
The following example shows part of a table from "[Configuration options for the dependabot.yml file](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file)".
963
965
964
966
965
967
<table>
@@ -994,7 +996,7 @@ The following example shows part of a table from "[Configuration options for the
Copy file name to clipboardExpand all lines: data/reusables/README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,18 @@ For example, a file named `/data/reusables/foo/bar.md` will be accessible as `{%
12
12
13
13
Reusable files are divided generally into directories by task. For example, if you're creating a reusable string for articles about GitHub notifications, you'd add it in the directory `data/reusables/notifications/` in a file named `data/reusables/notifications/your-reusable-name.md`. The content reference you'd add to the source would look like `{% data reusables.notifications.your-reusable-name %}`.
14
14
15
+
## Indenting
16
+
17
+
Indented reusables require a special liquid tag: `indented_data_reference` which also requires the number of spaces to indent as an argument.
18
+
19
+
For example, to indent `/data/reusables/foo/bar.md` in an ordered list, you could:
Reusables can include Liquid conditionals to conditionally render content depending on the current version being viewed. See [contributing/liquid-helpers.md](/contributing/liquid-helpers.md).
The following `qlpack.yml` file states that `my-github-user/my-query-tests` depends on `my-github-user/my-custom-queries` at a version greater than or equal to 1.2.3 and less than 2.0.0. It also declares that the CLI should use the Java `extractor` when creating test databases. The `tests: .` line declares that all `.ql` files in the pack should be run as tests when `codeql test run` is run with the `--strict-test-discovery` option. Typically, test packs do not contain a `version` property. This prevents you from accidentally publishing them.
0 commit comments