The Wayback Machine - https://web.archive.org/web/20260115112820/https://github.com/github/codeql/pull/3974
Skip to content

Conversation

@owen-mc
Copy link
Contributor

@owen-mc owen-mc commented Jul 24, 2020

Converted from Semmle wiki

Copy link
Contributor

@Marcono1234 Marcono1234 left a comment

Choose a reason for hiding this comment

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

Did you commit this with an e-mail address which differs from your GitHub e-mail address on purpose?

@@ -0,0 +1,125 @@
# Query classification and display

Attributable Queries
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be a sub-header?

Comment on lines 9 to 10
the value over (or under) the threshold. Some queries only trigger
another one doesn't. An example of this is the MaybeNull query which
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
the value over (or under) the threshold. Some queries only trigger
another one doesn't. An example of this is the MaybeNull query which
the value over (or under) the threshold. Some queries only trigger
when another one doesn't. An example of this is the MaybeNull query which

Missing "when"?

the value over (or under) the threshold. Some queries only trigger
another one doesn't. An example of this is the MaybeNull query which
only triggers if the AlwaysNull query doesn't. A small change in the
data flow could make an alert switch from AlwayNull to MaybeNull (or
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
data flow could make an alert switch from AlwayNull to MaybeNull (or
data flow could make an alert switch from AlwaysNull to MaybeNull (or

file" didn't. As a result adding some code to a duplicate file might
result in a "fix" of a "duplicate file" alert and an introduction of
many "duplicate function" alerts. This would be highly unfair.
Currently, on the duplicate and similar code queries exhibit this
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Currently, on the duplicate and similar code queries exhibit this
Currently, only the duplicate and similar code queries exhibit this

Comment on lines 30 to 34
- Metric violations, i.e. the ones with metadata properties like `
@(error|warning|recommendation)-(to|from) `
- Queries with tag ` non-attributable `

` `
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Metric violations, i.e. the ones with metadata properties like `
@(error|warning|recommendation)-(to|from) `
- Queries with tag ` non-attributable `
` `
- Metric violations, i.e. the ones with metadata properties like `@(error|warning|recommendation)-(to|from)`
- Queries with tag `non-attributable`

made visible by editing the project configuration.


 Queries from custom query packs (in-repo or site-wide) are always run
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
 Queries from custom query packs (in-repo or site-wide) are always run
Queries from custom query packs (in-repo or site-wide) are always run



 Queries from custom query packs (in-repo or site-wide) are always run
and displayed by default. The can be hidden by editing the project
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
and displayed by default. The can be hidden by editing the project
and displayed by default. They can be hidden by editing the project


This check is applied when the results of a single attribution are
loaded into the datastore. This means that any change to this behaviour
will only take effect on newly attributed revisions and the historical
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use "but" instead of "and" here to clearly indicate the difference

Suggested change
will only take effect on newly attributed revisions and the historical
will only take effect on newly attributed revisions but the historical


The following queries are excluded from attribution:

- Metric violations, i.e. the ones with metadata properties like `
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that here and for the other lists the indentation is not needed


<div class="table-wrap">

| Precision: | V. high | High | Medium | Low |
Copy link
Contributor

Choose a reason for hiding this comment

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

"V. high" could be written out as "Very-high" since the table is not that wide.
Same applies for the other table as well.

@owen-mc owen-mc force-pushed the docs/query-classification-and-display branch from 8e16554 to 6dbed5e Compare July 27, 2020 09:20
@owen-mc
Copy link
Contributor Author

owen-mc commented Jul 27, 2020

Thanks for the thorough review. I must apologise - I've been doing a lot of these conversions from the Semmle wiki recently and in this I have either lost a commit somewhere or forgotten to go through and fix up the conversion errors. Also, I was using a different computer while my normal one was being fixed and I forgot to set up my name or email address in git - thanks for pointing that out.

Copy link
Contributor

@Marcono1234 Marcono1234 left a comment

Choose a reason for hiding this comment

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

No problem. There is one more minor thing.


For precision, we have the following categories:

- Very-high
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use "Very high" (without hyphen) here since the tables below use this variant as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually on closer inspection it should have the hyphen, and all of them shouldn't have a capital letter, as this is what is actually found in the query files. I've corrected this.

@adityasharad adityasharad changed the base branch from master to main August 14, 2020 18:33
calumgrant
calumgrant previously approved these changes Oct 19, 2020
@owen-mc
Copy link
Contributor Author

owen-mc commented Oct 19, 2020

@calumgrant I had to force-push with a trivial change (extra space in a commit message) to get CI to pass. Unfortunately it dismissed your review. Can you add it back? (And feel free to merge)

@calumgrant calumgrant merged commit 7544bc8 into github:main Oct 22, 2020
@owen-mc owen-mc deleted the docs/query-classification-and-display branch October 22, 2020 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants