Support for nontraditional casing in namespaces (SA1300)
See original GitHub issueApplying StyleCop analyzers to an existing codebase is always difficult, but what happens when the company name begins with a small letter, e.g. eBay? How can you apply SA1300 to everything except the namespace
s? Imagine tens of thousands of files with several hundred namespaces like:
eBay.Services.Shipping
eBay.Services.Shipping.Entities
eBay.Services.Auction
eBay.Services.Auction.Bidding
Although normally namespace names are PascalCase
, Microsoft admits in their naming guidelines that
If your brand employs nontraditional casing, you should follow the casing defined by your brand, even if it deviates from normal namespace casing.
If someone were to do the work and create a PR, would it be acceptable to either:
a) include a “known terms dictionary” that SA1300 could use to ignore certain words?
b) make a very specific exception for namespaces since company names do not always follow PascalCase
?
Or, if neither of those would be accepted, is there any way to accomodate this situation?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:18 (14 by maintainers)
Top GitHub Comments
@jedidja this is now released to NuGet
@mzhukovs @mlessmann @cytron201 Hope this works out for you 😃 Thanks @sharwell for merging this!