Coder Social home page Coder Social logo

simoncropp / .net-analyzers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lombiq/.net-analyzers

0.0 1.0 0.0 434 KB

.NET code analyzers and code convention settings for Lombiq projects.

License: BSD 3-Clause "New" or "Revised" License

C# 38.38% PowerShell 61.62%

.net-analyzers's Introduction

Lombiq .NET Analyzers

Lombiq.Analyzers NuGet Lombiq.Analyzers.NetFx NuGet Lombiq.Analyzers.OrchardCore NuGet Lombiq.Analyzers.Orchard1 NuGet Lombiq.Analyzers.VisualStudioExtension NuGet

About

.NET code analyzers and code convention settings for Lombiq projects, for Orchard Core and any other .NET and .NET Framework apps. We use these to enforce common standards across all our .NET projects, including e.g. all of our open-source Orchard Core extensions. If you contribute to our open-source projects while using that solution you'll be guided by these rules, too. You can check out a demo video of the project here, and the Orchard Harvest 2023 conference talk about automated QA in Orchard Core here.

There is also support for non-SDK-style .NET Framework projects, as long as they use PackageReference for their dependencies (in contrast to packages.config).

Some other projects you may be interested in:

We at Lombiq also used this module for the following projects:

Do you want to quickly try out this project and see it in action? Check it out in our Open-Source Orchard Core Extensions full Orchard Core solution and also see our other useful Orchard Core-related open-source projects!

Analyzer packages used

We added and configured analyzers which are widely used and complement each other.

Furthermore, the project also includes an .editorconfig file with additional configuration for compatible editors.

Guides

Contributing and support

Bug reports, feature requests, comments, questions, code contributions and love letters are warmly welcome. You can send them to us via GitHub issues and pull requests. Please adhere to our open-source guidelines while doing so.

This project is developed by Lombiq Technologies. Commercial-grade support is available through Lombiq.

Publishing a new NuGet package

When publishing a new version of the NuGet package, even if it's just a pre-release, also update the package references under TestSolutions\Lombiq.Analyzers.PackageReferences to the new version. This is necessary to run the tests there.

Upgrading to a new version of the .NET SDK

When a new version of the .NET SDK comes out then to the following:

  • Change the LangVersion and AnalysisLevel elements in the Build.props file to opt in to new language features and analyzers. This does not concern non-SDK-style .NET Framework projects.
  • Wait for all analyzers to support the new SDK (primarily the new language features). Then update all packages to latest.
  • Check if there are new code analysis categories that we need to surface warnings for by default in the Lombiq.Analyzers.globalconfig file.

Adding a new analyzer

When adding a new analyzer package, do the following:

  • Check if the project is actively developed with issues addressed quickly.
  • Check if it has any significant impact on build or editing performance.
  • Go through all rules in the package and decide one by one whether we need them.
    • Check for rules that are already covered by some other analyzer and disable duplicates.
    • All rules that we need should be surfaced as Warnings. This allows to only break the build on analyzer violations when we need it, i.e. during CI builds but not during development.
    • Add rule configuration to the .globalconfig file of the relevant project, depending on which kind of applications they're applicable to. Editor-only configuration should be in .editorconfig files.
  • Test it on multiple significant solutions. Using the Hastlayer SDK is a good example as it's a large C# solution.

.net-analyzers's People

Contributors

piedone avatar sarahelsaig avatar 0liver avatar yevgeniyshunevych avatar mzole avatar benedekfarkas avatar boros-csaba avatar luko6 avatar barthamark avatar demeszabolcs avatar dministro avatar domonkosgabor avatar psichorex avatar porgabi avatar wasnk avatar i3undy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.