-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: remove dead PLGX-related code #39
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,5 +5,4 @@ tests/obj/ | |
| .worktrees/ | ||
| *.user | ||
| *.suo | ||
| *.plgx | ||
| *.dll | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -171,8 +171,7 @@ private static bool TryParseVersion(string value, out Version version) | |
| 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"; | ||
| } | ||
|
Comment on lines
171
to
175
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Logic Issue: Recommended Solution: 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));
} |
||
|
|
||
| private static string BuildReleaseUrl(string tagName) | ||
|
Comment on lines
171
to
177
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security/Consistency Issue: Recommended Solution: |
||
|
|
||
There was a problem hiding this comment.
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
ResolveInstalledFormatuses a ternary operator to returnPluginPackageFormat.Dllregardless of whether the file exists: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.