Closed vanillajonathan closed 1 year ago
@mganss You okay with this?
@vanillajonathan Just my opinion, obviously, but I don't know that this is really required. .NET has namespaces that violate the stated convention already, like System.IO
. XSS is an acronym, not a proper word, so I'd expect it to be written as-is.
Of course, there are namespaces like System.Web.Security.AntiXss
, so perhaps the precedent has been established to use the casing you're proposing. 🤷♂️
I'm hesitant on this. Not only would this be a breaking change, but it would require recompilation for all users. If I were faced with this change as a user, I'd probably think 🙄
@tiesont No System.IO
does not violate the .NET naming guidelines because IO
is a two-letter acronym and the the naming convention does not apply to two-letter acronyms, only three letter and longer. The linked page explains this.
@mganss Yes, this would a breaking change, but so was PR #370. They're both breaking changes. Introducing these breaking changes should be since they're introduced together at the same time for version 8.
I know this would be a good opportunity to introduce breaking changes. The issue I'm having with this change is that it's not about features but "just" a naming change, in particular one that might confuse users. When they update the NuGet package and recompile, they'll get errors which are not obvious to fix.
Modern IDEs autodiscover referenced classes and provides suggestions for using statements. You hover over the HtmlSanatizer
in the code and it presents you with a yellow light bulb that says "Import Ganss.Xss", this should be trivial for users to fix.
If this is the one and only thing in the project that violates the naming convention, I suppose it's at least worth considering. Does feel like like a rather pedantic change, if I'm being honest. I say that with absolutely no malice or ill will intended.
I am not aware of anything else that violates the naming convention. I agree that it is a pedantic change, but it would nice to "get it right" when there is an API breakage anyway in a new major version 8 release.
🆗 Let's do it then.
Rename namespace from
Ganss.XSS
toGanss.Xss
as per the Microsoft .NET Framework Design Guidelines Capitalization Conventions.