Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Cover LineDiff's CRLF, removal-only and large-diff branches

Abierto Apto para principiantes
#14 0 comentarios 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
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
90/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp
Área
testing

Línea de trabajo

Lee src/Prompuff.Application/Services/LineDiff.cs en torno al fallback y a SplitLines, y luego añade las tres pruebas de ramas a tests/Prompuff.Application.Tests/LineDiffTests.cs. Ejecuta dotnet test tests/Prompuff.Application.Tests. El trabajo estará terminado cuando los casos de CRLF, texto nulo y fallback de 2.001 líneas verifiquen las cantidades, los tipos, el orden y los números de línea especificados para los cambios.

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

Descripción

good first issue

The History tab's diff comes from LineDiff. Its tests cover additions, edits and identical texts, but three branches have no test:

  • SplitLines turns \r\n into \n, so a body with Windows line endings and the same body with LF endings should show no changes.
  • When the new text is empty or null, every old line is Removed.
  • When the changed middle is bigger than MaxTableCells (4,000,000 cells, so more than about 2,000 lines on each side), it skips the LCS table and lists every old line as removed, then every new line as added.

What to do

Add a test for each branch to LineDiffTests. For the large one, build two texts of 2,001 lines that share no line, such as a0…a2000 and b0…b2000, and check kinds, order and line numbers, not only the counts. Tests only; don't change LineDiff.

Where to look

  • src/Prompuff.Application/Services/LineDiff.cs: the fallback at line 58, SplitLines at line 117.
  • tests/Prompuff.Application.Tests/LineDiffTests.cs.

Done when

  • "a\r\nb" against "a\nb" gives only Unchanged lines, and CountChanges is (0, 0).
  • CountChanges("a\nb", null) is (0, 2), and Compute marks both lines Removed with old line numbers 1 and 2.
  • The large-diff test checks that all 2,001 Removed lines come before the 2,001 Added lines, with the right line numbers.
  • Nothing under src/ changes.

Testing it

dotnet test tests/Prompuff.Application.Tests
Lenguaje dominante
C#
Estrellas
0
Forks
1
Merge medio
1 h 21 min
PR fusionados (30 d)
22

Preparar el entorno

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 hazeliscoding/prompuff

Todos los issues de hazeliscoding/prompuff

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.