Skip to content

Conversation

@Jack251970
Copy link
Member

Using Flow.Launcher.Localization prevents analyzers from being packed into the NuGet package. To resolve this, we should consolidate them into a single project.

Additionally, I recommend downgrading the version to 0.0.1 since this project is not intended for production use yet.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 4, 2025

📝 Walkthrough

Walkthrough

The pull request removes several documentation and project files related to unshipped and shipped analyzer releases, streamlining the solution by removing references to analyzers and source generators. It also updates documentation in one file to introduce new localization rules and refactors namespace declarations across analyzer, diagnostics, and generator code files. Additionally, the main project file has been updated by replacing project references with package references and adjusting the version.

Changes

Files Summary
Flow.Launcher.Localization.Analyzers/AnalyzerReleases.Unshipped.md
Flow.Launcher.Localization.SourceGenerators/AnalyzerReleases.Shipped.md
Deleted documentation files for analyzer releases (unshipped and shipped)
Flow.Launcher.Localization.Analyzers/Flow.Launcher.Localization.Analyzers.csproj
Flow.Launcher.Localization.SourceGenerators/Flow.Launcher.Localization.SourceGenerators.csproj
Removed .NET project files for analyzers and source generators
Flow.Launcher.Localization.slnx Removed project references for analyzers and source generators, leaving only the main project reference
Flow.Launcher.Localization/AnalyzerReleases.Unshipped.md Updated documentation to shift focus from shipped to unshipped analyzers, adding five new localization rules (FLAN0001–FLAN0005)
Flow.Launcher.Localization/Analyzers/ContextAvailabilityAnalyzer.cs
Flow.Launcher.Localization/Analyzers/ContextAvailabilityAnalyzerCodeFixProvider.cs
Flow.Launcher.Localization/Analyzers/OldGetTranslateAnalyzer.cs
Flow.Launcher.Localization/Analyzers/OldGetTranslateAnalyzerCodeFixProvider.cs
Updated namespace declarations (removed ".Localize") and added a using directive for diagnostics; minor method signature formatting adjustments applied
Flow.Launcher.Localization/Diagnostics/AnalyzerDiagnostics.cs
Flow.Launcher.Localization/Diagnostics/SourceGeneratorDiagnostics.cs
Changed namespaces to group these classes under diagnostics
Flow.Launcher.Localization/Flow.Launcher.Localization.csproj Updated project version from 1.0.0 to 0.0.1; replaced project references with package references for Microsoft.CodeAnalysis packages
Flow.Launcher.Localization/Generators/LocalizeSourceGenerator.cs Changed namespace from SourceGenerators.Localize to Generators and added a using directive for diagnostics

Suggested reviewers

  • Yusyuriv

Poem

I hopped through lines of code so neat,
Tweaking namespaces with a nimble beat.
Docs and projects trimmed, a lighter load,
With new rules in place on the development road.
This rabbit cheers with a joyful sway –
Hop on, code friends, a bright new day!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04bd1bc and 8bff80c.

📒 Files selected for processing (1)
  • Flow.Launcher.Localization/Generators/LocalizeSourceGenerator.cs (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • Flow.Launcher.Localization/Generators/LocalizeSourceGenerator.cs
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: gitStream.cm

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
Flow.Launcher.Localization/AnalyzerReleases.Unshipped.md (2)

1-1: Potential Formatting Issue with BOM and Leading Semicolon.
The first line starts with a BOM and a semicolon (; Unshipped analyzer release). Please verify whether the semicolon is intentional (perhaps as a stylistic marker) or if it’s an artifact that might affect rendering or consistency in Markdown.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~1-~1: Loose punctuation mark.
Context: ; Unshipped analyzer release ; https://gi...

(UNLIKELY_OPENING_PUNCTUATION)


2-2: Encourage Proper URL Formatting.
The bare URL on line 2 may trigger markdownlint warnings (e.g., MD034, no-bare-urls). Consider wrapping the URL in angle brackets or converting it into a proper Markdown hyperlink (e.g., [Documentation](https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md)) for better compliance and readability.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

2-2: Bare URL used
null

(MD034, no-bare-urls)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0995c9b and 04bd1bc.

📒 Files selected for processing (14)
  • Flow.Launcher.Localization.Analyzers/AnalyzerReleases.Unshipped.md (0 hunks)
  • Flow.Launcher.Localization.Analyzers/Flow.Launcher.Localization.Analyzers.csproj (0 hunks)
  • Flow.Launcher.Localization.SourceGenerators/AnalyzerReleases.Shipped.md (0 hunks)
  • Flow.Launcher.Localization.SourceGenerators/Flow.Launcher.Localization.SourceGenerators.csproj (0 hunks)
  • Flow.Launcher.Localization.slnx (0 hunks)
  • Flow.Launcher.Localization/AnalyzerReleases.Unshipped.md (1 hunks)
  • Flow.Launcher.Localization/Analyzers/ContextAvailabilityAnalyzer.cs (1 hunks)
  • Flow.Launcher.Localization/Analyzers/ContextAvailabilityAnalyzerCodeFixProvider.cs (2 hunks)
  • Flow.Launcher.Localization/Analyzers/OldGetTranslateAnalyzer.cs (1 hunks)
  • Flow.Launcher.Localization/Analyzers/OldGetTranslateAnalyzerCodeFixProvider.cs (3 hunks)
  • Flow.Launcher.Localization/Diagnostics/AnalyzerDiagnostics.cs (1 hunks)
  • Flow.Launcher.Localization/Diagnostics/SourceGeneratorDiagnostics.cs (1 hunks)
  • Flow.Launcher.Localization/Flow.Launcher.Localization.csproj (1 hunks)
  • Flow.Launcher.Localization/Generators/LocalizeSourceGenerator.cs (1 hunks)
💤 Files with no reviewable changes (5)
  • Flow.Launcher.Localization.SourceGenerators/AnalyzerReleases.Shipped.md
  • Flow.Launcher.Localization.slnx
  • Flow.Launcher.Localization.Analyzers/AnalyzerReleases.Unshipped.md
  • Flow.Launcher.Localization.SourceGenerators/Flow.Launcher.Localization.SourceGenerators.csproj
  • Flow.Launcher.Localization.Analyzers/Flow.Launcher.Localization.Analyzers.csproj
✅ Files skipped from review due to trivial changes (7)
  • Flow.Launcher.Localization/Diagnostics/AnalyzerDiagnostics.cs
  • Flow.Launcher.Localization/Analyzers/ContextAvailabilityAnalyzer.cs
  • Flow.Launcher.Localization/Generators/LocalizeSourceGenerator.cs
  • Flow.Launcher.Localization/Analyzers/ContextAvailabilityAnalyzerCodeFixProvider.cs
  • Flow.Launcher.Localization/Analyzers/OldGetTranslateAnalyzer.cs
  • Flow.Launcher.Localization/Analyzers/OldGetTranslateAnalyzerCodeFixProvider.cs
  • Flow.Launcher.Localization/Diagnostics/SourceGeneratorDiagnostics.cs
🧰 Additional context used
🪛 LanguageTool
Flow.Launcher.Localization/AnalyzerReleases.Unshipped.md

[uncategorized] ~1-~1: Loose punctuation mark.
Context: ; Unshipped analyzer release ; https://gi...

(UNLIKELY_OPENING_PUNCTUATION)

🪛 markdownlint-cli2 (0.17.2)
Flow.Launcher.Localization/AnalyzerReleases.Unshipped.md

2-2: Bare URL used
null

(MD034, no-bare-urls)

🔇 Additional comments (3)
Flow.Launcher.Localization/AnalyzerReleases.Unshipped.md (1)

8-12: New Analyzer Rules Added.
The table entries for the new analyzer rules (FLAN0001 through FLAN0005) are formatted consistently and clearly communicate the rule details. The changes integrate well with the existing entries.

Flow.Launcher.Localization/Flow.Launcher.Localization.csproj (2)

4-4: Version Downgrade Implemented
The version has been updated to 0.0.1 to reflect the project's current pre-production state. Ensure that this downgrade is clearly communicated in your release notes and documentation so that downstream consumers are aware of the project’s non-production status.


11-17: Consolidated Package References for Analyzers
The removal of project references in favor of NuGet package references (Microsoft.CodeAnalysis.Analyzers, Microsoft.CodeAnalysis.CSharp, and Microsoft.CodeAnalysis.CSharp.Workspaces) is implemented correctly. The <PrivateAssets> and <IncludeAssets> settings for the analyzers package are configured appropriately to prevent unintended transitivity. Please verify that these packages satisfy all analyzer and source generation requirements after consolidation.

@Yusyuriv Yusyuriv self-requested a review March 5, 2025 01:25
@Jack251970 Jack251970 added the duplicate This issue or pull request already exists label Mar 5, 2025
@Jack251970 Jack251970 closed this Mar 5, 2025
@Jack251970 Jack251970 reopened this Mar 5, 2025
@Jack251970 Jack251970 removed the duplicate This issue or pull request already exists label Mar 5, 2025
@Jack251970 Jack251970 self-assigned this Mar 5, 2025
Yusyuriv
Yusyuriv previously approved these changes Mar 5, 2025
@Yusyuriv Yusyuriv self-requested a review March 5, 2025 02:55
@Yusyuriv
Copy link
Member

Yusyuriv commented Mar 5, 2025

Actually, I just created a fresh plugin project, and I can't seem to make this PR work. The package is included:

    <ItemGroup>
      <PackageReference Include="Flow.Launcher.Localization" Version="0.0.1">
        <OutputItemType>Analyzer</OutputItemType>
        <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        <PrivateAssets>all</PrivateAssets>
      </PackageReference>
      <PackageReference Include="Flow.Launcher.Plugin" Version="4.4.0" />
      <AdditionalFiles Include="Languages\en.xaml" />
    </ItemGroup>

it builds without issues, but doesn't complain about the property being private:

public class Class1: IPlugin, IPluginI18n {
    private static PluginInitContext Context { get; set; } = null!;

@Jack251970
Copy link
Member Author

Actually, I just created a fresh plugin project, and I can't seem to make this PR work. The package is included:

    <ItemGroup>
      <PackageReference Include="Flow.Launcher.Localization" Version="0.0.1">
        <OutputItemType>Analyzer</OutputItemType>
        <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
        <PrivateAssets>all</PrivateAssets>
      </PackageReference>
      <PackageReference Include="Flow.Launcher.Plugin" Version="4.4.0" />
      <AdditionalFiles Include="Languages\en.xaml" />
    </ItemGroup>

it builds without issues, but doesn't complain about the property being private:

public class Class1: IPlugin, IPluginI18n {
    private static PluginInitContext Context { get; set; } = null!;

I will check it now.

@Jack251970 Jack251970 closed this Mar 5, 2025
@Jack251970 Jack251970 added the duplicate This issue or pull request already exists label Mar 5, 2025
@Jack251970 Jack251970 deleted the single_project branch March 5, 2025 09:25
@Jack251970 Jack251970 added the invalid This doesn't seem right label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants