Commit Graph

8797 Commits

Author SHA1 Message Date
Tamas Vajk
2054c869fb C#: Fix buildless fallback restore logic
When dotnet core projects are restored, the dependency manager precisely tracks the referenced package folders. The fallback restore logic ignored the precise usage list and instead considered all subfolders in the restore location to be referenced, even though not all subfolders were added to the dependency list. This meant that packages downloaded in partially successful restores were available on disk, but not added to the dependency list by the normal restore process, and skipped by the fallback restore process. This commit fixes this problem by ensuring that the fallback restore logic doesn't consider all subfolders in the restore location to be referenced, but only those that were added to the dependency list by the normal restore process.
2025-03-18 09:51:39 +01:00
Michael B. Gale
51874b8ef0 Apply suggestions from code review
Co-authored-by: Michael Nebel <michaelnebel@github.com>
2025-03-17 14:24:04 +00:00
github-actions[bot]
51cdeefafb Post-release preparation for codeql-cli-2.20.7 2025-03-17 13:00:41 +00:00
github-actions[bot]
2d64a618e6 Release preparation for version 2.20.7 2025-03-17 12:15:54 +00:00
Michael B. Gale
284f612965 C#: Use StringBuilder for feed arguments in GetRestoreArgs 2025-03-14 14:06:48 +00:00
Michael B. Gale
b6c74fe306 C#: Narrow Exception to JsonException 2025-03-14 14:05:27 +00:00
Michael B. Gale
95605935fa C#: Fix .ToList() being called on null 2025-03-14 14:02:38 +00:00
Michael B. Gale
a8dde15a87 C#: Only provide feeds on command line if Dependabot proxy is enabled 2025-03-14 13:47:05 +00:00
Michael B. Gale
6b15f77168 C#: Fix test failures 2025-03-14 13:39:28 +00:00
Michael B. Gale
0db6a269e4 C#: Propagate explicit feeds to RestoreProjects 2025-03-14 13:39:27 +00:00
Michael B. Gale
726123c0cb C#: Allow specifying package feeds for dotnet restore as command line arguments 2025-03-14 13:39:26 +00:00
Michael B. Gale
11efb55aa1 C#: Parse environment variables to obtain list of registry URLs 2025-03-14 13:39:26 +00:00
Michael B. Gale
63d5517d7c C#: Add list of registries to DependabotProxy 2025-03-14 13:39:25 +00:00
Michael B. Gale
6b2f348c4c C#: Add CODEQL_PROXY_URLS environment variable 2025-03-14 13:39:23 +00:00
Michael Nebel
b3a1ff1fc3 C#: Add cs/non-short-circuit to the CCR suite. 2025-03-14 10:52:25 +01:00
Michael Nebel
a3ef137a8e Merge pull request #19014 from michaelnebel/csharp/ccr-useless-gethashcode-all
C#: Add `cs/useless-gethashcode-call` to the CCR suite.
2025-03-14 08:45:31 +01:00
Michael Nebel
563ffb8c27 Merge pull request #19010 from michaelnebel/csharp/useless-gethashcode-call
C#: Increase precision of `cs/useless-gethashcode-call`.
2025-03-14 08:44:38 +01:00
Michael Nebel
e2699586db C#: Add cs/useless-gethashcode-call to the CCR suite. 2025-03-13 15:42:28 +01:00
Michael Nebel
dff66c7b28 C#: Add change-note. 2025-03-13 13:42:58 +01:00
Michael Nebel
36a524929f C#: Update tests and test expected output. 2025-03-13 13:38:13 +01:00
Michael Nebel
4b02198652 C#: Only consider calling GetHashCode on byte, sbyte, short, ushort and int as useless. 2025-03-13 13:32:22 +01:00
Michael Nebel
a6ec8b6a25 C#: Convert tests cs/useless-gethashcode-call to inline tests. 2025-03-13 13:31:20 +01:00
Michael Nebel
b1edd9294b C#: Add some more test cases to cs/local-not-disposed. 2025-03-13 11:19:37 +01:00
Michael Nebel
209b9c6114 C#: Re-factor to use inline expectation tests instead. 2025-03-13 11:11:23 +01:00
Michael Nebel
40375a0387 C#: Use stubs for the cs/local-not-disposed tests. 2025-03-13 10:47:45 +01:00
Michael Nebel
5eb9a535a4 C#: Remove disposal test for library code as we are no longer doing CIL extraction or data flow. 2025-03-13 10:45:00 +01:00
Michael Nebel
b76527fa84 C#: Add cs/constant-condition to the CCR suite. 2025-03-12 14:55:20 +01:00
Michael Nebel
e79cb443da Merge pull request #18976 from michaelnebel/csharp/constant-condition
C#: Increase precision of `cs/constant-condition`.
2025-03-12 14:42:15 +01:00
Michael Nebel
42f86a8234 Update csharp/ql/src/Bad Practices/Control-Flow/ConstantCondition.ql
Co-authored-by: Tom Hvitved <hvitved@github.com>
2025-03-12 11:13:25 +01:00
Michael Nebel
9e8339db6d Merge pull request #18961 from michaelnebel/csharp/ccr-local-not-disposed
C#: Add `cs/local-not-disposed` to the CCR suite.
2025-03-12 09:18:40 +01:00
Michael Nebel
4a3e463918 Merge pull request #18950 from michaelnebel/csharp/localnotdisposed
C#: Exclude Task from cs/local-not-disposed.
2025-03-12 09:17:22 +01:00
Michael Nebel
371a72ecec C#: Move Bad test into other file to avoid sync-files breakage. 2025-03-11 14:54:13 +01:00
Michael Nebel
1286420d39 C#: Add change-note. 2025-03-11 14:42:51 +01:00
Michael Nebel
120af3611a C#: Update test expected output. 2025-03-11 14:39:09 +01:00
Michael Nebel
150aa5d1cf C#: Include normal switch/case statements in the white list and allow the use of wildcards when there is a condition. 2025-03-11 14:37:56 +01:00
Michael Nebel
c15137e992 C#: Update test expected output. 2025-03-11 14:36:34 +01:00
Michael Nebel
f42ae48ffa C#: Add some switch case examples. 2025-03-11 14:35:04 +01:00
Michael Nebel
4451e55bba C#: Convert cs/constant-condition tests to inline expectation tests. 2025-03-11 13:35:05 +01:00
Michael Nebel
744936fbd7 C#: Add cs/local-not-disposed to the CCR suite. 2025-03-11 12:46:16 +01:00
Michael Nebel
ca553bf1a2 Merge pull request #18932 from michaelnebel/csharp/ismatchingconstantunknowtype
C#: Special handling of unknown types in `isMatchingConstant`.
2025-03-10 14:37:27 +01:00
Michael Nebel
21aa62c18c C#: Address review comments. 2025-03-10 13:28:20 +01:00
Michael Nebel
a16c2c80f7 C#: Add change-note. 2025-03-10 13:03:01 +01:00
Michael Nebel
26f0f7f6da Update csharp/ql/test/query-tests/API Abuse/NoDisposeCallOnLocalIDisposable/NoDisposeCallOnLocalIDisposable.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-03-10 12:40:25 +01:00
Michael Nebel
13226edbeb C#: Add change-note. 2025-03-10 10:54:20 +01:00
Michael Nebel
3f8679a099 C#: Update test expected output. 2025-03-07 16:00:28 +01:00
Michael Nebel
7a99dfaebe C#: Do flag missing Dispose calls on Task and Task<>. 2025-03-07 15:14:07 +01:00
Michael Nebel
f58c72ed59 C#: Add example for local not disposed involving tasks. 2025-03-07 14:44:29 +01:00
Michael Nebel
3903a90a11 C#: Update expected test output. 2025-03-07 13:22:37 +01:00
Michael Nebel
b5ea34fcf3 C#: We can't do any reasoning based on unknown types on whether they match in a pattern. 2025-03-07 13:22:35 +01:00
Michael Nebel
5c0fc1f75b C#: Add BMN tests for cs/constant-condition. 2025-03-07 13:22:34 +01:00