Skip to content

Commit 06721ce

Browse files
committedDec 28, 2020
Docs: Add building and testing to contributing guide
1 parent 5647a47 commit 06721ce

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
 

‎CONTRIBUTING.md

+16
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@ Contributions to this project are [released](https://help.github.com/articles/gi
66

77
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
88

9+
## Building and testing
10+
11+
1. Install the CodeQL CLI as described in [Getting started with the CodeQL CLI](https://codeql.github.com/docs/codeql-cli/getting-started-with-the-codeql-cli/).
12+
13+
2. Ensure that `<extraction-root>/codeql` is in your `PATH`.
14+
15+
3. Clone this repository into `<extraction-root>/codeql-go` and change to this directory.
16+
17+
4. To build, run `make`.
18+
19+
5. To run the full test suite, run `make test`. This will take approximately one hour.
20+
21+
6. To run all tests in a directory and its subdirectories, run `codeql test run <directory>`, for example `codeql test run ql/test/query-tests/Security`.
22+
23+
7. To run an individual test, run `codeql test run <filename>`, where `<filename>` is a `.ql` or `.qlref` file, for example `codeql test run ql/test/query-tests/Security/CWE-020/MissingRegexpAnchor/MissingRegexpAnchor.qlref`.
24+
925
## Adding a new query
1026

1127
If you have an idea for a query that you would like to share with other CodeQL users, please open a pull request to add it to this repository.

0 commit comments

Comments
 (0)
Please sign in to comment.