v4.0.0
TL;DR upgrade instructions
If you used Lombiq .NET Analyzers in an Orchard Core app without overriding any of its configuration, then you have to change its package reference like this:
-<PackageReference Include="Lombiq.Analyzers" Version="x.y.z">
+<PackageReference Include="Lombiq.Analyzers.OrchardCore" Version="4.0.0">
Or if you used it as a Git submodule:
-<Import Project="tools/Lombiq.Analyzers/Lombiq.Analyzers/Build.props" />
+<Import Project="tools/Lombiq.Analyzers/Lombiq.Analyzers.OrchardCore/Build.props" />
If you have any other use case, then read on.
Breaking changes
This release upgrades how analyzer configuration is stored. If you've overridden some analyzer configuration, then you'll need to migrate those.
Previously, editor configuration like charset and tab width was in an .editorconfig file, together with some compatible analyzer rule configuration, and the rest of the analyzer rules were configured in RuleSet files. This release moves analyzer configuration to the currently recommended .globalconfig files, while keeping only editor configuration in the .editorconfig file.
Furthermore, to better aid using Lombiq.Analyzers
in any .NET project, regardless if it's an Orchard Core app or else, we've split the project into multiple, use case-specific projects/packages.
Upgrading from v3.x.x
Select the Lombiq.Analyzers
package suitable for you in any case
Previously, there was only a single Lombiq.Analyzers
project/package that contained configuration for general .NET, Orchard Core, Orchard 1 (.NET Framework), and Visual Studio Extension projects. By default, this provided configuration for Orchard Core projects. If you wanted to use it in any other kind of project, you needed to jump through hoops.
Now, there are multiple projects/packages, all specific to a given use case. To get the most suitable configuration for your project, you just need to select the most applicable one. Please check out the updated docs to see how to add the one suitable for you.
If you haven't overridden any analyzer configuration and just used the project as is
Nothing else to do.
If you have overridden analyzer configuration
If you have overridden configuration coming from a RuleSet file:
RuleSets are now deprecated and you need to use .globalconfig files for analyzer configuration instead.
- Open the RuleSet file in a text editor, NOT in the Visual Studio GUI editor.
- Remove the
<Include>
element that loads the default RuleSet file fromLombiq.Analyzers
so only the overriding rules will be converted. - Follow the official documentation to convert the file into an .editorconfig file. Save the file with the .globalconfig name, NOT .editorconfig.
- Put the file into the root of your solution if you want it to be applied to the whole solution. For more involved configuration options, see the updated docs.
If you have overridden configuration coming from the .editorconfig file:
The .editorconfig file now only stores editor-related configuration, like charset and tab settings. All analyzer configuration, also what was formerly in the .editorconfig file, is now in .globalconfig files. Follow the updated docs to override analyzer configuration from .globalconfig files. Overriding editor-related configuration with .editorconfig files works the same as before.
What's Changed
Full Changelog: v3.4.0...v4.0.0