So I started working on LibreOffice’s easyhacks, there are numerous hacks in different categories. But I quickly discovered I didn’t want to dive in the complicated or time consuming bugs. Luckily the easyhacks wiki has a lot of bugs that don’t require a lot of knowledge of LibreOffice’s internals.
The first bug I stumbled on was “remove pointless comments and ASCII art”, so this seems like an easy bug. The bug is about useless comments in the Libreoffice codebase, an example of this bug can be found here. And I soon discovered that the scale of these comments is mind-boggling as a quick “git grep” is showing.
With this regex and sed I could easily remove a lot of these comments as you can see in the code below.
Although I am still surprised that developers created these comments, I’m happy that I’ve found an easy way to improve readability of LibreOffice’s codebase and getting rid of ~ 46000 useless lines.