I've got a Portable ruleset for FxCop which turns off a few more things. I'm not really sure if it's "Portable" so much as "stuff the Autofac core assembly abides by but the other assemblies can be a little more strict."
There are a few more rules turned off for the Portable ruleset, Stuff like "avoid excessive parameters on generic types," "avoid namespaces with few types," and "implement standard constructors for exceptions." Some of those are because of the fluent interface and structure of the assembly, others are because of the PCL aspect of things.
The rest of the stuff I fixed was pretty much the same as before. Missing null checks, some typos in strings, adding "CultureInfo.CurrentCulture" to string.format calls. I think there were only three things I would consider potentially "breaking":
- Renamed the "PropertyWiringFlags" enumeration to "PropertyWiringOptions" because they want people to avoid "flags" as a suffix.
- Renamed the "Default" option in PropertyWiringOptions to "None" - the 0 option is generally named "None" even if it is default.
- Removed the "Default" member of ContainerBuildOptions enumeration and just used "None" in there. The idea is that you're only supposed to have one "zero value" in an enum, which makes sense.
I'm not sure if that means we should introduce some statics somewhere with default settings in case they need to be changed at some point.
It's a pretty big commit, but just tiny changes in each touched file. I don't think it should cause any major conflicts.
That means we have FxCop on the entire product suite, which makes me smile. I feel like FxCop is sort of like another suite of tests, building confidence.