Commit Graph

49 Commits

Author SHA1 Message Date
Michael Nebel
96b7250b61 C#: Mass enable quality queries and update tags. 2025-06-17 09:56:43 +02:00
Michael Nebel
ef4c921b5a Merge pull request #19482 from michaelnebel/csharp/code-quality-call-to-gc
C#: Add `cs/call-to-gc` to the code quality suite.
2025-05-14 13:03:24 +02:00
Michael Nebel
f5903eaf2d C#: Add cs/call-to-gc to the code quality suite. 2025-05-13 14:46:29 +02:00
Michael Nebel
133e8d4897 C#: Include CompositeFormat.Parse as Format like method. 2025-05-12 15:44:59 +02:00
Tamas Vajk
ea9b95790b Use code-quality-selectors in C# suite 2025-04-29 16:02:46 +02:00
Michael Nebel
f31235db43 C#: Improve format logic to take CompositeFormat and generics into account. 2025-04-24 08:54:39 +02:00
Michael Nebel
1d9d8780b3 C#: Remove some false positives and add more true positives for cs/invalid-string-format. 2025-04-24 08:54:34 +02:00
Michael Nebel
7a99dfaebe C#: Do flag missing Dispose calls on Task and Task<>. 2025-03-07 15:14:07 +01:00
Tamas Vajk
9d655520cc Code quality improvement 2024-03-21 11:26:45 +01:00
Tamas Vajk
9da8cb1165 C#: Simplify the output of cs/wrong-compareto-signature to remove entity locations 2024-03-21 10:27:55 +01:00
Tom Hvitved
b72f34591d C#: Use {get,has}FullyQualifiedName throughout 2023-11-10 08:46:15 +01:00
Michael Nebel
b7e36b7dec C#: Re-factor NoDisposeCallOnLocalIDisposable to use the new API. 2023-04-19 13:36:30 +02:00
Michael Nebel
5580023ec3 C#: Re-factor FormatInvalid to use the new API. 2023-04-19 13:36:30 +02:00
Michael Nebel
29ccac8e93 C#: Address review comments. 2022-12-06 12:05:48 +01:00
Michael Nebel
0a3295ef3f C#: Address review comments. 2022-12-06 11:59:13 +01:00
Michael Nebel
38e906f854 C#: Use hasQualifiedName instead of getQualifiedName. 2022-12-06 11:59:13 +01:00
Michael Nebel
c24302bec2 C#: Replace all uses of the deprecated hasQualifiedName/1 predicate. 2022-12-06 11:59:12 +01:00
Tom Hvitved
f49bfa7bcc C#: Deprecate Assignable(Read)::getAReachableRead 2022-10-12 14:08:46 +02:00
erik-krogh
326666ac85 update the alert-messages of csharp queries 2022-09-26 14:01:39 +02:00
Chuan-kai Lin
d6f0bbb816 Fix syntax errors in QL comments 2022-04-28 11:53:36 -07:00
Erik Krogh Kristensen
6ff8d4de5c add all remaining explicit this 2021-11-26 13:50:10 +01:00
Tom Hvitved
40b74167e0 C#: Improve performance of DisposeNotCalledOnException.ql 2021-04-16 14:34:16 +02:00
Tom Hvitved
1237e566d0 C#: Fix typo 2021-01-04 12:59:45 +01:00
Tom Hvitved
b5a1e039a4 C#: Merge queries FormatInvalid.ql, FormatMissingArgument.ql, and FormatUnusedArgument.ql 2020-12-21 10:13:56 +01:00
Tom Hvitved
d53faa86dc C#: Restrict FormatInvalid.ql and UncontrolledFormatString.ql to calls with insertions 2020-12-18 10:53:11 +01:00
Tom Hvitved
cd77f14a75 C#: Rename getSourceDeclaration() to getUnboundDeclaration() 2020-11-23 16:09:33 +01:00
Tom Hvitved
7cbf37c6ba C#: Convert string.format() queries to path queries 2020-04-28 09:59:19 +02:00
Anders Schack-Mulligen
726a873c3e C#: Autoformat. 2020-01-29 13:15:00 +01:00
Tom Hvitved
17085dc05c C#: Fix typo 2019-10-02 16:26:38 +02:00
Tom Hvitved
5a198a39df C#: Autoformat 2019-09-25 11:52:19 +02:00
Tom Hvitved
afdb788333 C#: Refactor cs/local-not-disposed using data flow library 2019-09-25 09:33:39 +02:00
Tom Hvitved
5c127ef20d C#: Fix false positives in cs/unchecked-return-value 2019-07-29 17:32:21 -07:00
Tom Hvitved
bd03e7a590 C#: Auto format 2019-06-26 19:32:08 +02:00
Calum Grant
02875721df C#: Address review comment. 2019-06-12 09:50:03 +01:00
Calum Grant
d055c85ff0 C#: Exclude case from cs/dispose-not-called-on-throw where the disposable is disposed by a UsingStmt, even when explicitly disposed. 2019-06-11 15:20:27 +01:00
Tom Hvitved
f5d52d0652 Merge pull request #274 from lukecartey/csharp/remove-security-tags
C#: Remove the 'security' tag from some queries
2019-04-03 17:04:25 +02:00
Tom Hvitved
6cd87757f6 C#: Fix a few minor performance regressions 2019-03-18 14:36:41 +01:00
Tom Hvitved
c8eb537591 C#: Improve performance of cs/dispose-not-called-on-throw 2019-02-21 11:20:54 +01:00
Anders Schack-Mulligen
bcaaebfe7e CSharp: Autoformat qlls 2019-02-12 14:38:42 +01:00
Tom Hvitved
e663abd5da C#: Avoid using ExceptionClass in deliberate Cartesian products
Using the class `ExceptionClass` in combination with a deliberate Cartesian
product can lead to bad join orders, for example

```
EVALUATE NONRECURSIVE RELATION:
  Completion::TriedControlFlowElement::getAThrownException_dispred#ff(int this, int result) :-
    {1} r1 = JOIN Expr::Expr::getType_dispred#ff_10#join_rhs WITH @integral_type#f ON Expr::Expr::getType_dispred#ff_10#join_rhs.<0>=@integral_type#f.<0> OUTPUT FIELDS {Expr::Expr::getType_dispred#ff_10#join_rhs.<1>}
    {1} r2 = JOIN r1 WITH @un_op#f ON r1.<0>=@un_op#f.<0> OUTPUT FIELDS {r1.<0>}
    {1} r3 = JOIN r2 WITH Stmt::TryStmt::getATriedElement#ff_1#join_rhs ON r2.<0>=Stmt::TryStmt::getATriedElement#ff_1#join_rhs.<0> OUTPUT FIELDS {r2.<0>}
    {2} r4 = JOIN r3 WITH Stmt::ExceptionClass#f CARTESIAN PRODUCT OUTPUT FIELDS {Stmt::ExceptionClass#f.<0>,r3.<0>}
    {2} r5 = JOIN r4 WITH System::SystemOverflowExceptionClass#class#f ON r4.<0>=System::SystemOverflowExceptionClass#class#f.<0> OUTPUT FIELDS {r4.<1>,r4.<0>}
```

where the CP is made with `ExceptionClass` rather than `SystemOverflowExceptionClass`
directly.
2019-02-07 20:42:21 +01:00
calum
7d17724cae C#: The empty string is not considered a format string for this query. 2019-02-04 12:53:12 +00:00
Tom Hvitved
b81d2ca8fa C#: Autoformat QLL files 2019-01-14 14:08:54 +01:00
Tom Hvitved
390ebc96ae C#: Autoformat QL files 2019-01-11 13:55:28 +01:00
Tom Hvitved
daa45322b1 C#: Autoformat QL queries 2019-01-02 12:59:07 +01:00
Luke Cartey
d34eef82b3 C#: Remove the 'security' tag from some queries
These queries are only tenuously security queries, and marking them as
security queries can cause them to have greater prominence than is
merited by the results that they report.
2018-10-03 11:48:27 +01:00
Tom Hvitved
70e713122f Merge branch 'rc/1.18' into merge-rc 2018-09-11 09:11:03 +02:00
Tom Hvitved
42faabc552 C#: Rename and restructure control flow graph entities
Follow a naming structure similar to the data flow library:

- `ControlFlowNode` -> `ControlFlow::Node`.
- `CallableEntryNode` -> `ControlFlow::Nodes::EntryNode`.
- `CallableExitNode` -> `ControlFlow::Nodes::ExitNode`.
- `ControlFlowEdgeType` -> `ControlFlow::SuccessorType`.
- `ControlFlowEdgeSuccessor` -> `ControlFlow::SuccessorTypes::NormalSuccessor`.
- `ControlFlowEdgeConditional -> ControlFlow::SuccessorTypes::ConditionalSuccessor`.
- `ControlFlowEdgeBoolean` -> `ControlFlow::SuccessorTypes::BooleanSuccessor`.
- `ControlFlowEdgeNullness` -> `ControlFlow::SuccessorTypes::NullnessSuccessor`.
- `ControlFlowEdgeMatching` -> `ControlFlow::SuccessorTypes::MatchingSuccessor`.
- `ControlFlowEdgeEmptiness` -> `ControlFlow::SuccessorTypes::EmptinessSuccessor`.
- `ControlFlowEdgeReturn` -> `ControlFlow::SuccessorTypes::ReturnSuccessor`.
- `ControlFlowEdgeBreak` -> `ControlFlow::SuccessorTypes::BreakSuccessor`.
- `ControlFlowEdgeContinue` -> `ControlFlow::SuccessorTypes::ContinueSuccessor`.
- `ControlFlowEdgeGotoLabel` -> `ControlFlow::SuccessorTypes::GotoLabelSuccessor`.
- `ControlFlowEdgeGotoCase` -> `ControlFlow::SuccessorTypes::GotoCaseSuccessor`.
- `ControlFlowEdgeGotoDefault` -> `ControlFlow::SuccessorTypes::GotoDefaultSuccessor`.
- `ControlFlowEdgeException` -> `ControlFlow::SuccessorTypes::ExceptionSuccessor`
2018-09-05 14:20:26 +02:00
Tom Hvitved
809da42f00 C#: Synchronize a few test files
Synchronized test files with the examples used in query help.
2018-08-30 21:46:37 +02:00
Pavel Avgustinov
b55526aa58 QL code and tests for C#/C++/JavaScript. 2018-08-02 17:53:23 +01:00