Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

`dotnet format style --verify-no-changes` fails with naming violations and unnecessary imports

Đang mở Phù hợp với người mới
#624 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 7 ngày

@nmummau đang làm issue này rồi.

Từ ngày 20/10/2026.

  • #625 của @nmummau — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
80/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
tooling

Hướng nghiên cứu

Bắt đầu với các tệp được liệt kê: bốn tệp thư viện lõi có chẩn đoán IDE1006 và năm tệp kiểm thử có chẩn đoán IDE0005. Đọc .editorconfig của kho lưu trữ và kiểm tra các trường được nêu, tham số hàm khởi tạo và các chỉ thị using; kiểm tra cách Analyzed.cs được biên dịch trong các bài kiểm thử trình phân tích. Chạy dotnet format style --verify-no-changes từ thư mục gốc của kho lưu trữ để xác nhận đã hoàn tất, sau đó kiểm tra xem các bài kiểm thử trình phân tích vẫn vượt qua.

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

Mô tả

Describe the bug

Running the style verification command from the repository root reports IDE1006 naming violations in four core library files and IDE0005 errors in five test files. The source does not satisfy the repository's existing .editorconfig rules, causing the verification command to fail.

To reproduce

  1. Use an Eventuous checkout at revision 60a76433.

  2. From the repository root, run:

    dotnet format style --verify-no-changes
    
  3. Observe the naming warnings and unnecessary-using errors below.

Expected behavior

The command exits successfully without reporting style violations or requiring source changes. The existing analyzer tests should continue to pass.

Actual behavior

The command reports the following diagnostics. Paths are relative to the repository root; repeated diagnostics and project-path suffixes have been omitted for readability. Line numbers refer to the affected revision.

src/Core/src/Eventuous.Diagnostics/EventuousDiagnostics.cs(18,38): warning IDE1006: Naming rule violation: These words must begin with upper case characters: listener
src/Core/src/Eventuous.Persistence/ExpectedStreamVersion.cs(14,36): warning IDE1006: Naming rule violation: The first word, 'Value', must begin with a lower case character
src/Core/src/Eventuous.Serialization/EventSerializer.cs(13,30): warning IDE1006: Naming rule violation: Prefix '_' is not expected
src/Core/src/Eventuous.Shared/TypeMap/TypeMap.cs(51,25): warning IDE1006: Naming rule violation: Prefix '_' is not expected
src/Core/test/Eventuous.Tests.Shared.Analyzers/Analyzed.cs(4,1): error IDE0005: Using directive is unnecessary.
src/Postgres/test/Eventuous.Tests.Postgres/Subscriptions/GapSkipTimeoutTest.cs(5,1): error IDE0005: Using directive is unnecessary.
src/Postgres/test/Eventuous.Tests.Postgres/Subscriptions/GapAgeReleaseWhileRunningTest.cs(5,1): error IDE0005: Using directive is unnecessary.
src/Postgres/test/Eventuous.Tests.Postgres/Subscriptions/GapRemediationBeforeSkipTest.cs(5,1): error IDE0005: Using directive is unnecessary.
src/Sqlite/test/Eventuous.Tests.Sqlite/Metrics/MetricsFixture.cs(9,1): error IDE0005: Using directive is unnecessary.

Environment

  • OS: Linux
  • .NET SDK: 10.0.201
  • Solution: Eventuous.slnx
  • Affected projects target net10.0, net9.0, and net8.0; diagnostics repeat across target frameworks.

Additional context

The naming violations concern the static fields listener, _default, and _index, and the StreamReadPosition constructor parameter Value. The public Value property is separate from the constructor parameter.

Analyzed.cs is also loaded directly as source by the analyzer tests. Its System, System.Collections.Generic, and System.Threading.Tasks imports duplicate SDK implicit usings during a normal project build, but the standalone Roslyn compilation needs equivalent imports. Removing the redundant directives should preserve that test compilation context.

Ngôn ngữ chính
C#
Star
512
Fork
99
Merge trung bình
5 ngày 6 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

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 Eventuous/eventuous

Tất cả issue của Eventuous/eventuous

Issue tương tự

Thêm issue về C#

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.