Sitelet https://web.archive.org/web/20260527215940/https://github.com/github/codeql-go/pull/441
Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Docs: Add building and testing to contributing guide#441

Merged
sauyon merged 1 commit into
github:mainfrom
twpayne:contributing-building-and-testing
Dec 29, 2020
Merged

Docs: Add building and testing to contributing guide#441
sauyon merged 1 commit into
github:mainfrom
twpayne:contributing-building-and-testing

Conversation

@twpayne
Copy link
Copy Markdown
Contributor

@twpayne twpayne commented Dec 23, 2020

This should help new contributors get started a little quicker.

Copy link
Copy Markdown
Contributor

@sauyon sauyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this will definitely be helpful for the future.

One comment, but otherwise looks great.

Comment thread CONTRIBUTING.md Outdated

5. To run the full test suite, run `make test`. This will take approximately one hour.

6. To run an individual test, run `codeql test run <directory>`, for example `codeql test run ql/test/query-tests/Security`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also run individual queries by passing the query file when there are multiple queries in a directory.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

@twpayne twpayne force-pushed the contributing-building-and-testing branch from 5fa9758 to 9da368e Compare December 23, 2020 20:51
Comment thread CONTRIBUTING.md Outdated

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`.

7. To run an individual test, run `codeql test run <filename>`, where `<filename>` is a `.qlref` file, for example `codeql test run ql/test/query-tests/Security/CWE-020/MissingRegexpAnchor/MissingRegexpAnchor.qlref`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests can also be .ql files, so this needs a tiny modification:

Suggested change
7. To run an individual test, run `codeql test run <filename>`, where `<filename>` is a `.qlref` file, for example `codeql test run ql/test/query-tests/Security/CWE-020/MissingRegexpAnchor/MissingRegexpAnchor.qlref`.
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`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

@twpayne twpayne force-pushed the contributing-building-and-testing branch from 9da368e to 06721ce Compare December 28, 2020 23:28
Copy link
Copy Markdown
Contributor

@sauyon sauyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks again!

@sauyon sauyon merged commit ace9271 into github:main Dec 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants