mmanela / diffplex

DiffPlex is Netstandard 1.0+ C# library to generate textual diffs.
Apache License 2.0
990 stars 183 forks source link

Could Diffplex avoid exporting the Log class? #115

Closed willdean closed 8 months ago

willdean commented 8 months ago

Diffplex contains a static class called Log, which has public visibility. As far as I can tell, it's only used in Differ.cs, and only when the project is built with LOG defined.

Diffplex publishing this class has the slightly undesirable side effect of competing in the eyes of tools like Resharper / Rider with the static Log class used by logging tools like Serilog. The first time we type Log. in any new file in any solution which uses Diffplex we have to disambiguate between the real Log class and the one from Diffplex.

In an ideal world I might be able to tell Resharper/Rider to ignore the Diffplex Log class, but I have not found a way to do this - would it be possible for Diffplex to stop exporting this class which seems only there for internal use anyway?

I'm happy to submit a PR if that would be helpful, though it's simply a matter of removing the word "public" on line 5 of Log.cs so a PR might be more faff than is necessary.

Many thanks.

Edit: Turns out there is a solution to this, at least in Rider - see SO answer

mmanela commented 8 months ago

Thanks for the comment, I am fine to accept that change.