Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open Beginner friendly
#14 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
90/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
testing

Research direction

Read src/Prompuff.Application/Services/LineDiff.cs around the fallback and SplitLines, then add the three branch tests to tests/Prompuff.Application.Tests/LineDiffTests.cs. Run dotnet test tests/Prompuff.Application.Tests. Done when the CRLF, null-text, and 2,001-line fallback cases verify the specified change counts, kinds, order, and line numbers.

Written by the indexing model from the issue text.

Description

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
Dominant language
C#
Stars
0
Forks
1
Avg merge
1h 21m
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from hazeliscoding/prompuff

All issues in hazeliscoding/prompuff

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.