Skip to content

Update analyzer deps / setup#185

Merged
LinusCenterstrom merged 4 commits into
masterfrom
update-analyzer
Jun 3, 2026
Merged

Update analyzer deps / setup#185
LinusCenterstrom merged 4 commits into
masterfrom
update-analyzer

Conversation

@LinusCenterstrom
Copy link
Copy Markdown
Collaborator

@LinusCenterstrom LinusCenterstrom commented May 22, 2026

Updated the Analyzer (mostly dependencies).
Removed Vsix project for publishing, now we just package normally as a nuget when building instead.
Marked both CodeAnalysis nugets as PrivateAssets so they don't leak into consuming projects.
Fixed a few warnings

Removed the NoParam rule. It served no purpose since _s needs at least one parameter to compile, we do not need an analyzer to verify that at least one parameter is passed.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the MN.L10n Roslyn analyzer packaging and dependencies, removing the legacy VSIX-based distribution and shifting to NuGet packaging during build, while also making some analyzer code adjustments.

Changes:

  • Removed the MN.L10n.Analyzer.Vsix project and its VSIX manifest from the solution.
  • Updated analyzer project packaging/dependency configuration (Roslyn component settings, PrivateAssets, version bump).
  • Refactored MNL10nAnalyzer to use a file-scoped namespace and nullable annotations, with small logic tweaks.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
MN.L10n.sln Removes the VSIX project from the solution and build configurations.
MN.L10n.Analyzer/MN.L10n.Analyzer/MNL10nAnalyzer.cs Refactors analyzer structure (file-scoped namespace, nullable) and adjusts analysis flow.
MN.L10n.Analyzer/MN.L10n.Analyzer/MN.L10n.Analyzer.csproj Updates packaging settings and Roslyn dependency references; bumps package version.
MN.L10n.Analyzer/MN.L10n.Analyzer.Vsix/source.extension.vsixmanifest Deletes VSIX manifest as VSIX packaging is removed.
MN.L10n.Analyzer/MN.L10n.Analyzer.Vsix/MN.L10n.Analyzer.Vsix.csproj Deletes the VSIX project file.
MN.L10n.Analyzer/MN.L10n.Analyzer.Test/MN.L10n.Analyzer.Test.csproj Updates Roslyn dependency version used by the test project.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread MN.L10n.Analyzer/MN.L10n.Analyzer/MNL10nAnalyzer.cs Outdated
Comment thread MN.L10n.Analyzer/MN.L10n.Analyzer/MNL10nAnalyzer.cs
The rule served no purpose, since _s requires at least one parameter to compile, we do not need an analyzer to validate that.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comment thread MN.L10n.Analyzer/MN.L10n.Analyzer/MNL10nAnalyzer.cs Outdated
Copy link
Copy Markdown
Member

@itssimple itssimple left a comment

Choose a reason for hiding this comment

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

Missing the MN0001-rule, but maybe we don't want to use that any longer?

Comment thread MN.L10n.Analyzer/MN.L10n.Analyzer/MNL10nAnalyzer.cs
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

case LiteralExpressionSyntax literalExpression:
var text = literalExpression.Token.ValueText;
if (string.IsNullOrWhiteSpace(text))
case BinaryExpressionSyntax binaryExpression:
case BinaryExpressionSyntax binaryExpression:
obj.ReportDiagnostic(Diagnostic.Create(NoStringConcatRule, obj.Node.GetLocation()));
break;
case MemberAccessExpressionSyntax memberAccess:
obj.ReportDiagnostic(Diagnostic.Create(NoStringConcatRule, obj.Node.GetLocation()));
break;
case MemberAccessExpressionSyntax memberAccess:
case InvocationExpressionSyntax invocationExpression:
case InvocationExpressionSyntax invocationExpression:
obj.ReportDiagnostic(Diagnostic.Create(MemberAccessorRule, obj.Node.GetLocation()));
break;
case InterpolatedStringExpressionSyntax interpolatedString:
@LinusCenterstrom LinusCenterstrom merged commit 6afbe69 into master Jun 3, 2026
3 checks passed
@LinusCenterstrom LinusCenterstrom deleted the update-analyzer branch June 3, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants