Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

✨ Diagnostic Manager

未关闭
#2,014 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
swift
领域
desktop

调研方向

首先定位编辑器的 Issue Navigator 和 Line Annotations 组件,然后跟踪它们当前如何接收诊断数据。围绕需求定义 DiagnosticManager 和 DiagnosticIssue,并按文件和可观察的变更对更新进行分组;完成的标准是两个组件都能使用 manager 作为共享的诊断源。

由索引模型根据 Issue 内容生成。

描述

bug enhancement extensions Issue language server navigator UI
Description

Introduce a DiagnosticManager responsible for managing and publishing diagnostics (e.g., build errors, linter warnings, language server issues) grouped by file. This manager will serve as the single source of truth for diagnostics across the editor, and its contents will drive visual components such as the Issue Navigator and Line Annotations.

Requirements
  • Create a DiagnosticManager class conforming to ObservableObject
  • Store diagnostics as a flat list or grouped by file:
    @Published var issues: [DiagnosticIssue]
    
  • Define a DiagnosticIssue model:
    struct DiagnosticIssue: Identifiable, Hashable {
        let id: UUID = UUID()
        let file: URL
        let line: Int
        let column: Int?
        let message: String
        let severity: Severity
        let source: String?
        let fixItSuggestion: String?
    
        enum Severity {
            case error, warning, info, live
        }
    }
    
  • Add convenience accessors:
    var issuesByFile: [URL: [DiagnosticIssue]]
    func issues(for file: URL) -> [DiagnosticIssue]
    
  • Add a way to update issues by file, e.g.:
    func setIssues(_ issues: [DiagnosticIssue], for file: URL)
    func clearIssues(for file: URL)
    
Additional Context

This manager will be used by multiple parts of the app, including the Issue Navigator and Line Annotations. It should be reactive and efficient, allowing UI components to automatically update when diagnostics change.

Future extensions may include filtering, debouncing updates, or supporting different diagnostics sources (build system, LSP, etc.).

Related Issues
主要语言
Swift
星标
23k
派生
1.2k
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CodeEditApp/CodeEdit 的其他 Issue

查看 CodeEditApp/CodeEdit 的全部 Issue

相似的 Issue

更多 Swift Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。