Open
Conversation
Reviewer's Guide添加可复用的正则助手和一个带类型的 NeoForge 版本正则表达式,并调整 NeoForge 版本继承逻辑和列表生成方式,以修复缺失的 26.1 版本问题。 正则助手和 NeoForge 版本列表的类图classDiagram
class ModBase {
+List~string~ RegexSearch(str string, regex Regex, options RegexOptions)
+string RegexSeek(str string, regex string, options RegexOptions)
}
class RegexPatterns {
<<static>>
+Regex DlNeoForgeVersion
-Regex _DlNeoForgeVersion()
}
class ModDownload {
+List~DlNeoForgeListEntry~ GetNeoForgeEntries(latestJson string, latestLegacyJson string)
}
class DlNeoForgeListEntry {
+DlNeoForgeListEntry(name string)
}
ModDownload ..> ModBase : uses RegexSearch
ModDownload ..> RegexPatterns : uses DlNeoForgeVersion
ModDownload --> DlNeoForgeListEntry : creates
更新后的 NeoForge 条目获取流程图flowchart TD
A[Start GetNeoForgeEntries
latestJson, latestLegacyJson] --> B[Concatenate latestLegacyJson and latestJson]
B --> C[Call RegexSearch
with DlNeoForgeVersion
pattern]
C --> D[Obtain list versionNames]
D --> E[Filter out versionName == 47.1.82]
E --> F[For each remaining versionName
create DlNeoForgeListEntry]
F --> G[Collect entries into list]
G --> H[Return list of DlNeoForgeListEntry]
H --> I[End]
文件级变更
针对关联 Issue 的评估
可能相关的 Issue
技巧与命令与 Sourcery 交互
自定义你的体验访问你的 控制面板 可进行以下操作:
获取帮助Original review guide in EnglishReviewer's GuideAdds a reusable regex helper and a typed NeoForge-version regex, and adjusts NeoForge version inheritance logic and listing to fix missing 26.1 versions. Class diagram for regex helpers and NeoForge version listingclassDiagram
class ModBase {
+List~string~ RegexSearch(str string, regex Regex, options RegexOptions)
+string RegexSeek(str string, regex string, options RegexOptions)
}
class RegexPatterns {
<<static>>
+Regex DlNeoForgeVersion
-Regex _DlNeoForgeVersion()
}
class ModDownload {
+List~DlNeoForgeListEntry~ GetNeoForgeEntries(latestJson string, latestLegacyJson string)
}
class DlNeoForgeListEntry {
+DlNeoForgeListEntry(name string)
}
ModDownload ..> ModBase : uses RegexSearch
ModDownload ..> RegexPatterns : uses DlNeoForgeVersion
ModDownload --> DlNeoForgeListEntry : creates
Flow diagram for updated NeoForge entries retrievalflowchart TD
A[Start GetNeoForgeEntries
latestJson, latestLegacyJson] --> B[Concatenate latestLegacyJson and latestJson]
B --> C[Call RegexSearch
with DlNeoForgeVersion
pattern]
C --> D[Obtain list versionNames]
D --> E[Filter out versionName == 47.1.82]
E --> F[For each remaining versionName
create DlNeoForgeListEntry]
F --> G[Collect entries into list]
G --> H[Return list of DlNeoForgeListEntry]
H --> I[End]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - 我在这里给出了一些整体性的反馈:
- 在新的接收
Regex的RegexSearch扩展中,Optional options As RegexOptions参数从未被使用,可以将其移除,以避免混淆并让 API 表面保持最小化。 - 既然
RegexSearch现在已经有一个接收Regex的重载,建议检查一下剩余仍然传入模式字符串的调用方,以确保各个重载之间没有歧义,并且每个调用点都在使用最合适的重载。
面向 AI 代理的提示
请根据本次代码评审中的评论进行修改:
## 总体评论
- 在新的接收 `Regex` 的 `RegexSearch` 扩展中,`Optional options As RegexOptions` 参数从未被使用,可以将其移除,以避免混淆并让 API 表面保持最小化。
- 既然 `RegexSearch` 现在已经有一个接收 `Regex` 的重载,建议检查一下剩余仍然传入模式字符串的调用方,以确保各个重载之间没有歧义,并且每个调用点都在使用最合适的重载。帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续的评审。
Original comment in English
Hey - I've left some high level feedback:
- In the new
RegexSearchextension that takes aRegex, theOptional options As RegexOptionsparameter is never used and can be removed to avoid confusion and keep the API surface minimal. - Now that
RegexSearchhas an overload that takes aRegex, it would be good to check for any remaining callers that pass a pattern string to ensure there’s no ambiguity between overloads and that each call site is using the most appropriate overload.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the new `RegexSearch` extension that takes a `Regex`, the `Optional options As RegexOptions` parameter is never used and can be removed to avoid confusion and keep the API surface minimal.
- Now that `RegexSearch` has an overload that takes a `Regex`, it would be good to check for any remaining callers that pass a pattern string to ensure there’s no ambiguity between overloads and that each call site is using the most appropriate overload.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolve #2642
我不知道为啥这个码在 CE 这里跑不了
Summary by Sourcery
修复 Minecraft 26.1 及相关版本的 NeoForge 版本列表与继承处理问题。
Bug 修复:
增强功能:
Original summary in English
Summary by Sourcery
Fix NeoForge version listing and inheritance handling for Minecraft 26.1 and related versions.
Bug Fixes:
Enhancements: