Skip to content

Latest commit

 

History

History
53 lines (32 loc) · 3.97 KB

CONTRIBUTING.md

File metadata and controls

53 lines (32 loc) · 3.97 KB

How to Contribute

There are several ways to contribute to this project. One can try things out, report bugs, propose improvements and new functionality, work on issues (for new contributors especially the issues marked with the labels help wanted and Good First Issue), and in general join in the conversations.

Try Things Out

This project is still very much in its early stages, so the more eyes that take a look at the code, try out the analyzers on existing test etc. the better. So please try to use the analyzers with your NUnit test projects and provide feedback. The input is much appreciated.

Report Bugs and Propose Improvements and New Functionality

The analyzers are still in its alpha release, so it is likely to contain a number of unknown bugs and/or missing some essential features. So try it out and provide feedback, such as bug reports or requests for improvements or new functionality.

Bug Reports

For bug reports please provide as much information as possible:

  • A short and clear title that describes the bug
  • Version of the package
  • Include steps to reproduce the issue
  • The expected and the actual behaviour (preferably including small code examples)

Requests for Improvements and New Functionality

For requests for improvements and new functionality please provide:

  • A short and clear title that describes the feature
  • A more thorough description of the feature (preferably including small code examples)
  • Possibly how the feature relates to existing functionality

Working on Issues

Please provide pull requests for issues, but before starting on a pull request comment in the issue such that we avoid duplicated work - also comment if you stop working on the issue. The issues marked with the labels help wanted and Good First Issue should be most accessible, and be a good starting ground for new contributors.

The coding standards is specified in the .editorconfig, and otherwise try to follow the existing codebase. Please also supply tests for changes - if the change is possible to test.

Note that by contributing to NUnit.Analyzers, you assert that:

  • The contribution is your own original work.
  • You have the right to assign the copyright for the work (it is not owned by your employer, or you have been given copyright assignment in writing).
  • You license the contribution under the terms applied to the rest of the NUnit.Analyzers project.
  • You agree to follow the code of conduct.

Building the Project

First, make sure you have the right tools and templates on your machine. You'll need Visual Studio 2019 version 16.3 (or newer) and the .NET Compiler Platform SDK. The .NET Compiler Platform SDK can be installed via the Visual Studio Installer under the Individual components tab and check the box for .NET Compiler Platform SDK (at the top of the Compilers, build tools, and runtimes section).

The project can now be built from within Visual Studio, or by using the Cake script in the root folder.

Building using Visual Studio

From Visual Studio one can debug the analyzers by adding a small test that illustrates the problem (get inspiration from the existing tests - depending on whether it is a problem with a diagnostic or a codefix). Add a breakpoint to the relevant method, compile and run the test from within Visual Studio, and you can now debug the analyzer code.

Building using Cake

The command .\build.ps1 will restore the packages necessary to build the solution, build the projects, and then run the tests. The script can also build the projects in Release mode using the option --configuration=Release or create NuGet Packages using the option --target=Pack. This will create a NuGet package under package\Debug\ (for a Debug build) and the file will be named NUnit.Analyzers.***.nupkg where *** depends upon the build type (Debug vs. Release) and the version. The NuGet package can then be referenced from another project.