Closed ThomasBarnekow closed 6 years ago
@tomjebo Regarding the sln.DotSettings file, you are likely aware that this is a ReSharper-generated file for the team settings, which should generally be under source code control. This file determines the code layout and formatting applied by ReSharper. For people using ReSharper, those settings will make sure that ReSharper does not flag issues just because the settings on the local machine are different. For people not using ReSharper, those settings are completely ignored and don't hurt.
I can certainly remove it if there is another way of ensuring consistency and quality in the code base. But that doesn't exist in the moment.
Would that change your thinking?
@tomjebo Regarding the license and copyright info, do you mean the info concerning the WmlComperer or the other code I've contributed? For example, among other things, I wrote the following classes (in corresponding files) from scratch:
PowerToolsBlock
(used to allow combination of strongly typed classes and PowerTools)PowerToolsBlockExtensions
(used to allow combination of strongly typed classes and PowerTools)StronglyTypedBlock
(used to allow combination of strongly typed classes and PowerTools)UnicodeMapper
(used in OpenXmlRegex)@ThomasBarnekow the license/copyright issue is being handled offline. Don't worry about that. We can just go ahead with your PR without considering that for now and then we'll update all the copyright header comments and the LICENSE.txt file to match with the SDK in a separate PR.
Regarding the reSharper DotSettings file, we typically use stylecop.json and just add resharper and other tools in .gitignore for folks to maintain locally. I would be ok with adding it but I don't see that it's common practice for OfficeDev projects. Let me check with some other folks and get back to you on this.
@tomjebo I'm happy to embrace whatever standard is used. Consistency within the OfficeDev projects would certainly add value.
@ThomasBarnekow we should be ok with having DotSettings (and other tool settings files) co-exist with stylecop.json. So I'm ok with adding the file. @twsouthwick do you have any issues? If not, then I'll merge.
I'm fine with it for now as it helps maintain some consistency. The challenge with it is dependent on an install of Resharper (with associated license) and isn't enforced at build time. Long term, getting the stylecop analyzers in will negate the need hopefully, but since they're not in at this moment, I'm good with it. .
This commit refactors the
WmlComparer
, putting classes into their own files and splitting the very largeWmlComparer
class into multiple partial classes. If further fixes many (but not all) issues flagged by static code analysis.For easier reference, the existing
WmlComparer
class is temporarily retained in theOpenXmlPowerTools.Previous
namespace. For organizational purposes, the refactored version is stored in theComparer
folder, which does however not create a namespace.The objective of this commit is to not create breaking changes. The one exception is the removal of the internal
WmlComparer.Coalesce
method, which was only invoked in one unit test. This is deemed a left-over from previous rewrites and is thus removed. The unit test is commented out for now.This pull request essentially prepares the
WmlComparer
for future enhancements.