{"thread":{"id":"64276","subject":"[rfd] a new core.whitespace class \"\\No newline at end of file\"","startedAt":"2025-10-08T17:39:16Z","lastAt":"2025-10-08T19:29:04Z","messageCount":2,"participants":["Junio C Hamano","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"528285","messageId":"xmqqjz15fg3i.fsf@gitster.g","threadId":"64276","inReplyTo":null,"subject":"[rfd] a new core.whitespace class \"\\No newline at end of file\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-10-08T17:39:13Z","receivedAt":"2025-10-08T17:39:16Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"It would be a good sized internship project to introduce a new\ncore.whitespace class that is about a file that ends in an\nincomplete line (it would be way too big as a microproject, so I would\nnot add the #leftoverbits tag to this one).\n\nThe student needs to learn quite a lot of things, including\n\n - they need to study the diff machinery to learn how existing\n   whitespace breakages are reported, in order to figure out how to\n   add a new class of whitespace breakage;\n\n - they need to find a good name for this new class;\n\n - they need to study the apply machinery to learn how existing\n   whitespace breakages are reported or corrected, in order to\n   figure out how to add support for this new class.\n\nThoughts?\n"},{"id":"528298","messageId":"aOa7fWV5RgbyApiq@fruit.crustytoothpaste.net","threadId":"64276","inReplyTo":"xmqqjz15fg3i.fsf@gitster.g","subject":"Re: [rfd] a new core.whitespace class \"\\No newline at end of file\"","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2025-10-08T19:29:01Z","receivedAt":"2025-10-08T19:29:04Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2025-10-08 at 17:39:13, Junio C Hamano wrote:\n> It would be a good sized internship project to introduce a new\n> core.whitespace class that is about a file that ends in an\n> incomplete line (it would be way too big as a microproject, so I would\n> not add the #leftoverbits tag to this one).\n> \n> The student needs to learn quite a lot of things, including\n> \n>  - they need to study the diff machinery to learn how existing\n>    whitespace breakages are reported, in order to figure out how to\n>    add a new class of whitespace breakage;\n> \n>  - they need to find a good name for this new class;\n> \n>  - they need to study the apply machinery to learn how existing\n>    whitespace breakages are reported or corrected, in order to\n>    figure out how to add support for this new class.\n> \n> Thoughts?\n\nI think this is a great idea.  I've noticed that many newer developers\nare using VS Code, which I believe leaves off the trailing newline by\ndefault.\n\nI think most people on this list understand why having a newline at the\nend of the file is valuable and have configured their editors\naccordingly, but for less experienced developers, this kind of lint\ncould be useful to help visualize these problems and even catch them in\nCI.  Possibly the documentation (say, the FAQ) could be updated to help\nexplain why this kind of whitespace breakage should be avoided as well.\n-- \nbrian m. carlson (they/them)\nToronto, Ontario, CA\n"}]}