[🚀 Feature]: Improve .NET formatting / linting

Abierto
#17,023 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Tranquilo
Stack tecnológico
csharp
Área
tooling

Línea de trabajo

Comienza con dotnet/.editorconfig y revisa las infracciones de diagnóstico enumeradas. Ejecuta dotnet format style --diagnostics IDEXXXX --severity info y los comandos de formateo de Bazel documentados para investigar las reglas candidatas. Se considera terminado cuando se seleccionan reglas útiles, se corrigen las infracciones pertinentes y se configuran explícitamente las advertencias deseadas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
Java
Estrellas
34.6k
Forks
8.7k
Merge medio
1 d 16 h
PR fusionados (30 d)
107

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de SeleniumHQ/selenium

Todos los issues de SeleniumHQ/selenium

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.