Skip to content

refactor: remove dead PLGX-related code#39

Merged
hieuck merged 1 commit into
mainfrom
feature/remove-dead-plgx-code
Jul 8, 2026
Merged

refactor: remove dead PLGX-related code#39
hieuck merged 1 commit into
mainfrom
feature/remove-dead-plgx-code

Conversation

@hieuck

@hieuck hieuck commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary\r\nSince PLGX builds were removed from CI and the release pipeline now ships only DLL assets, all PLGX-related code is dead. This PR removes it.\r\n\r\n## Changes\r\n- Remove ; only remains.\r\n- Remove PLGX detection in .\r\n- Simplify to always use .\r\n- Remove PLGX-specific tests.\r\n- Remove from .\r\n\r\n## Tests\r\n- MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. passes: 51/51.\r\n\r\nCloses #35.

- Remove PluginPackageFormat.Plgx; only DLL format is supported.

- Remove PLGX detection from PluginPathResolver.

- Remove PLGX asset URL handling from UpdateChecker.

- Remove PLGX tests; dotnet test passes 51/51.

- Remove *.plgx from .gitignore.

Closes #35.
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@hieuck, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 36 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e326f08-1f4a-400e-9421-a89fe9431400

📥 Commits

Reviewing files that changed from the base of the PR and between 50feefc and 882d559.

📒 Files selected for processing (4)
  • .gitignore
  • src/PluginPathResolver.cs
  • src/UpdateChecker.cs
  • tests/Tests.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/remove-dead-plgx-code

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

Comment @coderabbitai help to get the list of available commands.

Comment thread src/PluginPathResolver.cs
Comment on lines 40 to 41
return File.Exists(dllPath) ? PluginPackageFormat.Dll : PluginPackageFormat.Dll;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Logical Redundancy in Return Statement

The return statement in ResolveInstalledFormat uses a ternary operator to return PluginPackageFormat.Dll regardless of whether the file exists:

return File.Exists(dllPath) ? PluginPackageFormat.Dll : PluginPackageFormat.Dll;

This is redundant and does not provide any meaningful distinction between the two cases. Consider handling the scenario where the DLL does not exist, either by throwing an exception, returning a different format, or logging an error for better maintainability and clarity.

Comment thread src/UpdateChecker.cs
Comment on lines 171 to 175
private static string BuildAssetUrl(string tagName, PluginPackageFormat format)
{
if (string.IsNullOrEmpty(tagName)) return ReleasesUrl;
string extension = format == PluginPackageFormat.Plgx ? ".plgx" : ".dll";
return "https://github.com/hieuck/KeePassAutoReload/releases/download/" + tagName + "/KeePassAutoReload" + extension;
return "https://github.com/hieuck/KeePassAutoReload/releases/download/" + tagName + "/KeePassAutoReload.dll";
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Logic Issue:
The BuildAssetUrl method accepts a format parameter but does not use it, always returning the DLL asset URL. If multiple asset formats are supported, the method should use the format parameter to construct the correct URL. Otherwise, remove the parameter to avoid confusion.

Recommended Solution:
Update the method to handle different formats, e.g.:

switch (format) {
    case PluginPackageFormat.Dll:
        return $"https://github.com/hieuck/KeePassAutoReload/releases/download/{tagName}/KeePassAutoReload.dll";
    // Add cases for other formats
    default:
        throw new ArgumentException("Unsupported format", nameof(format));
}

Comment thread src/UpdateChecker.cs
Comment on lines 171 to 177
private static string BuildAssetUrl(string tagName, PluginPackageFormat format)
{
if (string.IsNullOrEmpty(tagName)) return ReleasesUrl;
string extension = format == PluginPackageFormat.Plgx ? ".plgx" : ".dll";
return "https://github.com/hieuck/KeePassAutoReload/releases/download/" + tagName + "/KeePassAutoReload" + extension;
return "https://github.com/hieuck/KeePassAutoReload/releases/download/" + tagName + "/KeePassAutoReload.dll";
}

private static string BuildReleaseUrl(string tagName)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Security/Consistency Issue:
Neither BuildAssetUrl nor BuildReleaseUrl validate or sanitize the tagName input. If tagName is derived from external sources, this could lead to malformed URLs or potential injection vulnerabilities.

Recommended Solution:
Sanitize tagName to ensure it contains only valid characters for a URL path segment before using it in URL construction.

@hieuck hieuck merged commit 6a03da1 into main Jul 8, 2026
2 checks passed
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.

1 participant