Skip to content

Commit 619d25e

Browse files
authored
Merge pull request github#13107 from github/felicitymay-10250-swift
Minor docs updates for Swift public beta
2 parents 100d960 + f72fe3e commit 619d25e

File tree

5 files changed

+26
-4
lines changed

5 files changed

+26
-4
lines changed

docs/codeql/query-help/codeql-cwe-coverage.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CodeQL CWE coverage
44
You can view the full coverage of MITRE's Common Weakness Enumeration (CWE) or coverage by language for the latest release of CodeQL.
55

66
.. include:: ../reusables/kotlin-beta-note.rst
7+
.. include:: ../reusables/swift-beta-note.rst
78

89
About CWEs
910
##########
@@ -36,4 +37,5 @@ Note that the CWE coverage includes both "`supported queries <https://github.com
3637
javascript-cwe
3738
python-cwe
3839
ruby-cwe
40+
swift-cwe
3941

docs/codeql/query-help/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ View the query help for the queries included in the ``default``, ``security-exte
77
- :doc:`CodeQL query help for C# <csharp>`
88
- :doc:`CodeQL query help for Go <go>`
99
- :doc:`CodeQL query help for Java and Kotlin <java>`
10-
- :doc:`CodeQL query help for JavaScript <javascript>`
10+
- :doc:`CodeQL query help for JavaScript and TypeScript <javascript>`
1111
- :doc:`CodeQL query help for Python <python>`
1212
- :doc:`CodeQL query help for Ruby <ruby>`
13+
- :doc:`CodeQL query help for Swift <swift>`
1314

1415
.. include:: ../reusables/kotlin-beta-note.rst
1516
.. include:: ../reusables/swift-beta-note.rst
@@ -37,4 +38,5 @@ For a full list of the CWEs covered by these queries, see ":doc:`CodeQL CWE cove
3738
javascript
3839
python
3940
ruby
41+
swift
4042
codeql-cwe-coverage

docs/codeql/query-help/swift-cwe.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# CWE coverage for Swift
2+
3+
An overview of CWE coverage for Swift in the latest release of CodeQL.
4+
5+
## Overview
6+
7+
<!-- autogenerated CWE coverage table will be added below -->
8+

docs/codeql/query-help/swift.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CodeQL query help for Swift
2+
===========================
3+
4+
.. include:: ../reusables/query-help-overview.rst
5+
6+
These queries are published in the CodeQL query pack ``codeql/swift-queries`` (`changelog <https://github.com/github/codeql/tree/codeql-cli/latest/swift/ql/src/CHANGELOG.md>`__, `source <https://github.com/github/codeql/tree/codeql-cli/latest/swift/ql/src>`__).
7+
8+
For shorter queries that you can use as building blocks when writing your own queries, see the `example queries in the CodeQL repository <https://github.com/github/codeql/tree/codeql-cli/latest/swift/ql/examples>`__.
9+
10+
.. include:: toc-swift.rst

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ For more language-specific information on analyzing data flow, see:
3030
- ":ref:`Analyzing data flow in JavaScript/TypeScript <analyzing-data-flow-in-javascript-and-typescript>`"
3131
- ":ref:`Analyzing data flow in Python <analyzing-data-flow-in-python>`"
3232
- ":ref:`Analyzing data flow in Ruby <analyzing-data-flow-in-ruby>`"
33-
33+
- ":ref:`Analyzing data flow in Swift <analyzing-data-flow-in-swift>`"
3434

3535
Path query examples
3636
*******************
@@ -56,8 +56,8 @@ You should use the following template:
5656
*/
5757
5858
import <language>
59-
// For some languages (Java/C++/Python) you need to explicitly import the data flow library, such as
60-
// import semmle.code.java.dataflow.DataFlow
59+
// For some languages (Java/C++/Python/Swift) you need to explicitly import the data flow library, such as
60+
// import semmle.code.java.dataflow.DataFlow or import codeql.swift.dataflow.DataFlow
6161
import DataFlow::PathGraph
6262
...
6363

0 commit comments

Comments
 (0)