Skip to content
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

Should GlobalSupressions suppress CA1806 instead? #26213

Open
petro2050 opened this issue Jul 3, 2023 · 2 comments
Open

Should GlobalSupressions suppress CA1806 instead? #26213

petro2050 opened this issue Jul 3, 2023 · 2 comments
Labels
bug This issue is a bug. effort/medium Medium work item – several days of effort p3 package/tools Related to AWS CDK Tools or CLI

Comments

@petro2050
Copy link

Describe the bug

When I cdk init a new app, GlobalSupressions.cs is suppressing RECS0026. However, it seems this has no visible effect. When a new object is created without a variable referencing it, I'm getting CA1806. This is for a .NET 6 app running in VS Code.

Expected Behavior

GlobalSupressions should successfully suppress unassigned object warnings.

Current Behavior

GlobalSupressions seems ineffective.

Reproduction Steps

see the description

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.85.0

Framework Version

No response

Node.js Version

18.12.1

OS

macOS

Language

.NET

Language Version

No response

Other information

No response

@petro2050 petro2050 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 3, 2023
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Jul 3, 2023
@pahud
Copy link
Contributor

pahud commented Jul 5, 2023

Hi

How did you cdk init this app? Can you share your full steps?

Also, what makes you believe GlobalSupressions.cs is suppressing RECS0026? Can you share more details or screenshots about that?

Thanks.

@pahud pahud added p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jul 5, 2023
@petro2050
Copy link
Author

mkdir cdktest
cd cdktest
cdk init -l csharp
cd src
dotnet restore

There are squiggly lines under CdktestStack with a warning about CA1806. I'm actually not sure if RECS0026 is being suppressed.

Screenshot 2023-07-06 at 10 00 29 AM

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jul 6, 2023
@pahud pahud added p3 and removed p2 labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/medium Medium work item – several days of effort p3 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

2 participants