For code, we know approaches like DRY and we tend to extract common functionality. What approaches are recommended for comments? Perhaps it's a really open question, so I'm going to go with my specific scenario:
In a project I work for, we use a library for charts, which has a few bugs. It's not very well maintained and it's difficult to change that in the near future.
I have like 8/9 files with different implementations of different charts which use this library, and today I found my self having to implement a complex workaround for each of them due to a bug in the library. Because of that, I thought of a four-or-five-line comment clarifying why is that workaround required (like the scenario that caused it and why that fix is correct)
Even though the root cause of the bug is the same, the solutions are different for each file (for each chart), so I cannot extract the solution into a common code. So I found myself having to copy the exact same comment into every file, which increases the chances of, at some point, becoming stale or out of date at some point in the future.
What approaches do you consider for repeated comments across different files? Perhaps for this particular scenario, it might make sense to create a small markdown file with the comment and link it instead of having the same comment in 7/8 locations, but I wonder if it's worth the effort when it is just 3 or 4 files. Or maybe there are other approaches for comment management.