✨ Diagnostic Manager

Đang mở
#2,014 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
swift
Lĩnh vực
desktop

Hướng nghiên cứu

Bắt đầu bằng cách xác định các component Issue Navigator và Line Annotations của editor, sau đó lần theo cách chúng hiện đang nhận dữ liệu chẩn đoán. Xác định DiagnosticManager và DiagnosticIssue dựa trên các yêu cầu, nhóm các cập nhật theo file và các thay đổi có thể quan sát được; công việc được xem là hoàn tất khi cả hai component đều có thể sử dụng manager làm nguồn chẩn đoán dùng chung.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Swift
Star
23k
Fork
1.2k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CodeEditApp/CodeEdit

Tất cả issue của CodeEditApp/CodeEdit

Issue tương tự

Thêm issue về Swift

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.