Skip to content

Commit bf0201a

Browse files
author
Felicity Chapman
authored
Merge pull request #1641 from jf205/move-ql-docs
Docs: add QL language documentation to `semmle/ql` repo
2 parents 9f97165 + a1cabfd commit bf0201a

File tree

230 files changed

+26048
-0
lines changed

Some content is hidden

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

230 files changed

+26048
-0
lines changed

docs/ql-documentation/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# VSCode rst extension build directory
2+
**/_build/

docs/ql-documentation/.vale.ini

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Vale configuration for the QL documentation
2+
# https://errata-ai.github.io/vale/
3+
4+
# Core properties
5+
#----------------
6+
# Specify where to find styles
7+
StylesPath = vale-styles
8+
9+
# Specify the minimum alert level to report
10+
# Alerts are assigned a level of suggestion, warning, or error.
11+
# For local use it's good to see all the suggestions and warnings.
12+
MinAlertLevel = suggestions
13+
14+
# Specify how to test a particular type of files
15+
#-----------------------------------------------
16+
[*.{rst,csv}]
17+
18+
# Vale comes with three built-in styles: write-good, proselint, and Joblint.
19+
# You could enable all rules in the "Microsoft" style guide as follows:
20+
# BasedOnStyles = Microsoft
21+
BasedOnStyles = Semmle
22+
23+
# Initially, we only want to run a few rules, so we'll specify them individually
24+
# Style.Rule = {YES, NO} to enable or disable a specific rule
25+
Microsoft.DateFormat = YES
26+
Microsoft.DateNumbers = YES
27+
Microsoft.DateOrder = YES
28+
Microsoft.Foreign = YES
29+
Microsoft.Gender = YES
30+
Microsoft.OxfordComma = YES
31+
Microsoft.Quotes = YES
32+
Microsoft.Semicolon = YES
33+
Microsoft.SentenceLength = YES
34+
Microsoft.URLFormat = YES
35+
Microsoft.Wordiness = YES
36+
37+
# This rule should never be run, it's replaced by a Semmle rule of the same name.
38+
Microsoft.Headings = NO
39+
40+
# Modify the level of some rules
41+
Microsoft.Wordiness = suggestion
42+
Microsoft.OxfordComma = error

docs/ql-documentation/README.rst

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
QL language documentation
2+
#########################
3+
4+
Overview
5+
********
6+
7+
The QL language documentation is written in reStructuredText and converted to
8+
HTML for manual publication on `help.semmle.com <https://help.semmle.com>`__ using Sphinx.
9+
10+
For more information on writing in reStructuredText,
11+
see http://docutils.sourceforge.net/rst.html.
12+
13+
For more information on Sphinx, see https://www.sphinx-doc.org.
14+
15+
Project structure
16+
*****************
17+
18+
The QL language documentation currently consists of the following Sphinx projects:
19+
20+
- ``learn-ql``–help topics to help you learn the QL language and write queries
21+
- ``ql-handbook``–a user-friendly guide to the QL language
22+
- ``ql-spec``–formal descriptions of the QL language and QLDoc comments
23+
- ``support``–the languages and frameworks currently supported in QL analysis
24+
- ``training``–QL for variant analysis training material
25+
- ``ql-training-rst``–QL for variant analysis slide shows
26+
27+
Each project contains:
28+
29+
- an ``index.html`` file, the project's
30+
`master document <https://www.sphinx-doc.org/en/master/glossary.html#term-master-document>`__.
31+
- a ``conf.py`` file that defines some project-specific configuration values
32+
- one or more reStructuredText source files
33+
34+
Shared configuration values are specified in ``global-conf.py``, which is found
35+
in the ``global-sphinx-files`` directory.
36+
This directory also contains any other files, such as templates and stylesheets,
37+
that are used by multiple projects.
38+
Images used in the QL documentation are located in the ``images`` directory.
39+
40+
The ``ql-training-rst`` project contains the source files, themes, and static files
41+
used to generate the QL training presentations.
42+
It uses a different configuration from the other projects, and is built using an
43+
extension specifically designed for HTML slide shows.
44+
For more information, see
45+
**Building and previewing the QL training presentations** below.
46+
47+
48+
Building and previewing the QL language documentation
49+
*****************************************************
50+
51+
To build and preview the QL documentation locally, you need to install Sphinx.
52+
For installation options, see https://github.com/sphinx-doc/sphinx.
53+
54+
After installing Sphinx, you can build the HTML files for a project by running
55+
`sphinx-build <https://www.sphinx-doc.org/en/master/man/sphinx-build.html>`__
56+
from the project's
57+
`source directory <https://www.sphinx-doc.org/en/master/glossary.html#term-source-directory>`__.
58+
For example, to generate the HTML output for a project in the
59+
``<docs-output>`` directory you would use:
60+
61+
.. code::
62+
63+
sphinx-build -b html . <docs-output>
64+
65+
Building and previewing the QL training presentations
66+
*****************************************************
67+
68+
To build the QL training presentations, you need to install a Sphinx extension
69+
called `hieroglyph <https://github.com/nyergler/hieroglyph>`__.
70+
71+
After installing hieroglyph, you can build the QL training presentations by running
72+
``sphinx-build``, specifying the ``slides`` builder. For example
73+
74+
.. code::
75+
76+
sphinx-build -b slides . <slides-output>
77+
78+
generates html slide shows in the ``<slides-output>`` directory when run from
79+
the ``ql-training-rst`` source directory.
80+
81+
82+
Viewing the current version of the QL language documentation
83+
************************************************************
84+
85+
The QL language documentation for the most recent Semmle release is
86+
published to `help.semmle.com <https://help.semmle.com>`__.
87+
There, you can also find the documentation for QL for Eclipse,
88+
QL for Visual Studio, QL command-line tools, and LGTM Enterprise.

docs/ql-documentation/global-sphinx-files/_static/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)