Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/codeql/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,4 @@ def setup(sphinx):
html_favicon = 'images/site/favicon.ico'

# Exclude these paths from being built by Sphinx
exclude_patterns = ['vale*', '_static', '_templates', 'reusables', 'images', 'support', 'ql-training', 'query-help', '_build', '*.py*', 'README.rst']
exclude_patterns = ['vale*', '_static', '_templates', 'reusables', 'images', 'support', 'query-help', '_build', '*.py*', 'README.rst' ,'ql-training/slide-snippets']
1 change: 1 addition & 0 deletions docs/codeql/contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ CodeQL documentation
writing-codeql-queries/index
codeql-language-guides/index
ql-language-reference/index
ql-training/index

17 changes: 0 additions & 17 deletions docs/codeql/ql-training/cpp/control-flow-cpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,6 @@ Control flow graphs

Possible execution order is usually represented by a *control flow graph*:

.. graphviz::

digraph {
graph [ dpi = 1000 ]
node [shape=polygon,sides=4,color=blue4,style="filled,rounded",fontname=consolas,fontcolor=white]
a [label=<if<BR /><FONT POINT-SIZE="10">IfStmt</FONT>>]
b [label=<x<BR /><FONT POINT-SIZE="10">VariableAccess</FONT>>]
c [label=<1<BR /><FONT POINT-SIZE="10">Literal</FONT>>]
d [label=<2<BR /><FONT POINT-SIZE="10">Literal</FONT>>]
e [label=<return<BR /><FONT POINT-SIZE="10">ReturnStmt</FONT>>]
f [label=<return<BR /><FONT POINT-SIZE="10">ReturnStmt</FONT>>]

a -> b
b -> {c, d}
c -> e
d -> f
}

.. note::

Expand Down
21 changes: 0 additions & 21 deletions docs/codeql/ql-training/slide-snippets/abstract-syntax-tree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,6 @@ The basic representation of an analyzed program is an *abstract syntax tree (AST
} catch (AnException e) {
}

.. container:: ast-graph

.. graphviz::

digraph {
graph [ dpi = 1000 ]
node [shape=polygon,sides=4,color=blue4,style="filled,rounded", fontname=consolas,fontcolor=white]
a [label=<TryStmt>]
b [label=<CatchClause>]
c [label=<...>,color=white,fontcolor=black]
d [label=<LocalVariable<BR />DeclExpr>]
e [label=<...>,color=white,fontcolor=black]
f [label=<...>,color=white,fontcolor=black]
g [label=<...>,color=white,fontcolor=black]

a -> {b, c}
b -> {d, e}
d -> {f, g}
}


.. note::

When writing queries it is important to have in mind the underlying representation of the program which is stored in the database. Typically queries make use of the “AST” representation of the program - a tree structure where program elements are nested within other program elements.
Expand Down
17 changes: 0 additions & 17 deletions docs/codeql/ql-training/slide-snippets/local-data-flow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,6 @@ Data flow graphs

Data flow graph:

.. graphviz::

digraph {
graph [ dpi = 1000 ]
node [shape=polygon,sides=4,color=blue4,style="filled,rounded", fontname=consolas,fontcolor=white]
a [label=<tainted<BR /><FONT POINT-SIZE="10">ParameterNode</FONT>>]
b [label=<tainted<BR /><FONT POINT-SIZE="10">ExprNode</FONT>>]
c [label=<x<BR /><FONT POINT-SIZE="10">ExprNode</FONT>>]
d [label=<x<BR /><FONT POINT-SIZE="10">ExprNode</FONT>>]
e [label=<y<BR /><FONT POINT-SIZE="10">ExprNode</FONT>>]

a -> b
b -> {c, d}
c -> e

}

Local vs global data flow
=========================

Expand Down
13 changes: 0 additions & 13 deletions docs/codeql/ql-training/template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,6 @@ Columns and graphs
Graphs can be built from text using a ``.. graphviz directive``.
See the source file for details.

.. graphviz::

digraph {
graph [ dpi = 1000 ]
node [shape=polygon,sides=4,color=blue4,style="filled,rounded", fontname=consolas,fontcolor=white]
a [label=<tainted<BR /><FONT POINT-SIZE="10">ParameterNode</FONT>>]
b [label=<tainted<BR /><FONT POINT-SIZE="10">ExprNode</FONT>>]
c [label=<x<BR /><FONT POINT-SIZE="10">ExprNode</FONT>>]
d [label=<x<BR /><FONT POINT-SIZE="10">ExprNode</FONT>>]
a -> b
b -> {c, d}
}

.. You can indicate a new concept by using a purple slide background

.. rst-class:: background2
Expand Down