FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Include custom query help in analysis results by cklin · Pull Request #804 · github/codeql-action · GitHub

Include custom query help in analysis results - #804

Merged
cklin merged 1 commit into
mainfrom
cklin/include-custom-query-help
Nov 3, 2021
Merged

cklin merged 1 commit into
mainfrom
cklin/include-custom-query-help

Conversation

cklin commented Nov 2, 2021

Copy link
Copy Markdown
Contributor

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

cklin force-pushed the cklin/include-custom-query-help branch from ffd03a1 to cf59610 Compare November 2, 2021 18:01
cklin marked this pull request as ready for review November 2, 2021 18:24
cklin requested a review from a team as a code owner November 2, 2021 18:24
cklin force-pushed the cklin/include-custom-query-help branch from cf59610 to eef9c63 Compare November 2, 2021 18:25

adityasharad left a comment

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Code change looks good, some suggestions for change note and tests.

Comment thread CHANGELOG.md Outdated
## [UNRELEASED]

- The `init` step of the Action now supports `ram` and `threads` inputs to limit resource use of CodeQL extractors. These inputs also serve as defaults to the subsequent `analyze` step, which finalizes the database and executes queries. [#738](https://github.com/github/codeql-action/pull/738)
- When used with CodeQL bundle 2.7.1 or above, the action now includes custom query help (if it exists in Markdown files that have the same paths as the query files but with `.md` extension instead of `.ql`) in analysis results. [#804](https://github.com/github/codeql-action/pull/804)

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

How's this?

Suggested change
- When used with CodeQL bundle 2.7.1 or above, the action now includes custom query help (if it exists in Markdown files that have the same paths as the query files but with `.md` extension instead of `.ql`) in analysis results. [#804](https://github.com/github/codeql-action/pull/804)
- When used with CodeQL 2.7.1 or above, the Action now includes custom query help in the analysis results uploaded to GitHub code scanning, if available. To add help text for a custom query, create a Markdown file next to the `.ql` file containing the query, using the same base name but the file extension `.md`. [#804](https://github.com/github/codeql-action/pull/804)

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

That is much better. I applied it to the commit.

Comment thread src/codeql.ts
cklin force-pushed the cklin/include-custom-query-help branch 3 times, most recently from 71b4936 to 01d7f67 Compare November 3, 2021 19:05
cklin requested a review from adityasharad November 3, 2021 19:06
Comment thread src/codeql.test.ts Outdated
await codeqlObject.databaseInterpretResults("", [], "", "", "", "");
t.false(
runnerConstructorStub.firstCall.args[1].includes("--sarif-add-query-help"),
"--sarif-add-query-help is present"

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is the failure message? Perhaps "should not be present".

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you for the suggestion. I updated the failure message.

Comment thread src/codeql.test.ts Outdated
await codeqlObject.databaseInterpretResults("", [], "", "", "", "");
t.true(
runnerConstructorStub.firstCall.args[1].includes("--sarif-add-query-help"),
"--sarif-add-query-help is present"

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

should be present

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you for the suggestion. I updated the failure message.

cklin force-pushed the cklin/include-custom-query-help branch from 01d7f67 to 9a44540 Compare November 3, 2021 20:19
cklin enabled auto-merge November 3, 2021 20:21
cklin merged commit 8f0825e into main Nov 3, 2021
cklin deleted the cklin/include-custom-query-help branch November 3, 2021 20:33
github-actions Bot mentioned this pull request Nov 4, 2021
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL