[🚀 Feature]: Improve .NET formatting / linting

オープン
#17,023 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
csharp
領域
tooling

調査の方向性

dotnet/.editorconfig から始め、記載されている診断違反を確認します。dotnet format style --diagnostics IDEXXXX --severity info と、文書化されている Bazel のフォーマットコマンドを実行して、候補となるルールを調査します。完了条件は、有用なルールを選択し、関連する違反を修正し、必要な警告を明示的に設定することです。

索引モデルが issue の本文から書いたものです。

説明

C-dotnet I-enhancement
Description

#17019 created the scaffolding and #17020 added the execution for .NET linting and formatting.

The issue is to dig deeper into what things in the .NET codebase can be improved by explicit rules and consistency. Ideally it is obvious how to add good code in .NET based on the rules we have an enforce.

I'm honestly not sure how much we need or how much is enough, but I know there is more work that can be done.

Have you considered any alternatives or workarounds?

This is what I have in dotnet/.editorconfig right now for specific enforcement. The idea is to add anything that can be automatically fixed that we want to enforce as a warning, and anything that we want to enforce but can't be automatically fixed by bazel run //dotnet:format -- style / bazel run //dotnet:format -- whitespace

dotnet_diagnostic.IDE0044.severity = warning  # Make field readonly
dotnet_diagnostic.IDE0076.severity = warning  # Invalid suppression
dotnet_diagnostic.IDE1005.severity = warning  # Delegate invocation

# TODO: Additional violations to investigate
# The following are the number of violations for each diagnostic;
# They currently fail at info, the goal is to fix and explicitly set to warning above
# Investigate with `dotnet format style --diagnostics IDEXXXX --severity info`
# 1183 IDE0090
# 633 IDE0028
# 252 IDE0290
# 169 IDE0077
# 66 IDE0130
# 65 IDE0300
# 57 IDE1005
# 42 IDE0017
# 39 IDE0039
# 36 IDE0063
# 33 IDE0306
# 31 IDE0083
# 30 IDE0016
# 30 IDE0059
# 26 IDE0305
# 18 IDE0031
# 12 IDE0270
# 11 IDE0057
# 11 IDE0054
# 9 IDE0350
# 9 IDE0074
# 7 IDE0060
# 3 IDE0150
# 2 IDE0038
# 1 IDE0056
# 1 IDE0034
# 1 IDE0018
# ? IDE1006
主要言語
Java
スター
34.6k
フォーク
8.7k
平均マージ
1日 16時間
マージ済み PR(30日)
107

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SeleniumHQ/selenium のほかの issue

SeleniumHQ/selenium の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。