-
Notifications
You must be signed in to change notification settings - Fork 1.9k
C#: Make sure allFeeds contains at least explicitFeeds
#21236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mbg
wants to merge
7
commits into
main
Choose a base branch
from
mbg/csharp/fix-registry-feeds
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+132
−0
Open
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
76fe3fa
C#: Make sure `allFeeds` contains at least `explicitFeeds`
mbg 5ba3b67
Move into if statement
mbg 1b5ed12
Log and emit diagnostic if incorrectly named files are found
mbg 1aba0b2
Add integration test
mbg 3e07196
Fix missing negation
mbg ad2aa6d
Accept expected diagnostic output
mbg 454d13b
Remove element check
mbg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
6 changes: 6 additions & 0 deletions
6
csharp/ql/integration-tests/linux/diag_nuget_config_casing/Program.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| class Program | ||
| { | ||
| static void Main(string[] args) | ||
| { | ||
| } | ||
| } |
42 changes: 42 additions & 0 deletions
42
csharp/ql/integration-tests/linux/diag_nuget_config_casing/diagnostics.expected
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| { | ||
| "markdownMessage": "C# analysis with build-mode 'none' completed.", | ||
| "severity": "unknown", | ||
| "source": { | ||
| "extractorName": "csharp", | ||
| "id": "csharp/autobuilder/buildless/complete", | ||
| "name": "C# analysis with build-mode 'none' completed" | ||
| }, | ||
| "visibility": { | ||
| "cliSummaryTable": true, | ||
| "statusPage": false, | ||
| "telemetry": true | ||
| } | ||
| } | ||
| { | ||
| "markdownMessage": "C# was extracted with build-mode set to 'none'. This means that all C# source in the working directory will be scanned, with build tools, such as NuGet and dotnet CLIs, only contributing information about external dependencies.", | ||
| "severity": "note", | ||
| "source": { | ||
| "extractorName": "csharp", | ||
| "id": "csharp/autobuilder/buildless/mode-active", | ||
| "name": "C# was extracted with build-mode set to 'none'" | ||
| }, | ||
| "visibility": { | ||
| "cliSummaryTable": true, | ||
| "statusPage": true, | ||
| "telemetry": true | ||
| } | ||
| } | ||
| { | ||
| "markdownMessage": "On platforms with case-sensitive file systems, NuGet only accepts files with one of the following names: nuget.config, NuGet.config, NuGet.Config.\n\nCodeQL found the following files while performing an analysis on a platform with a case-sensitive file system:\n\n- `<test-root-directory>/sub-project/Nuget.Config`\n\nTo avoid unexpected results, rename these files to match the casing of one of the accepted filenames.", | ||
| "severity": "warning", | ||
| "source": { | ||
| "extractorName": "csharp", | ||
| "id": "csharp/autobuilder/buildless/case-sensitive-nuget-config", | ||
| "name": "Found NuGet configuration files which are not correctly named" | ||
| }, | ||
| "visibility": { | ||
| "cliSummaryTable": true, | ||
| "statusPage": true, | ||
| "telemetry": true | ||
| } | ||
| } |
5 changes: 5 additions & 0 deletions
5
csharp/ql/integration-tests/linux/diag_nuget_config_casing/global.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "sdk": { | ||
| "version": "10.0.100" | ||
| } | ||
| } |
5 changes: 5 additions & 0 deletions
5
csharp/ql/integration-tests/linux/diag_nuget_config_casing/sub-project/Nuget.Config
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <configuration> | ||
| <packageSources> | ||
| </packageSources> | ||
| </configuration> |
8 changes: 8 additions & 0 deletions
8
csharp/ql/integration-tests/linux/diag_nuget_config_casing/test.csproj
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| </PropertyGroup> | ||
|
|
||
| </Project> |
5 changes: 5 additions & 0 deletions
5
csharp/ql/integration-tests/linux/diag_nuget_config_casing/test.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import runs_on | ||
|
|
||
| @runs_on.linux | ||
| def test(codeql, csharp): | ||
| codeql.database.create(build_mode="none") |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.