From 5c1ea92d7cb09dc0d1a5ad2c5a2fed5cf52ea47b Mon Sep 17 00:00:00 2001 From: Oluwatoni Solarin-Sodara Date: Thu, 17 Jan 2019 11:36:16 +0100 Subject: [PATCH] add separate contribution guide document --- CONTRIBUTING.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 54 +----------------------------------------------- 2 files changed, 56 insertions(+), 53 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..fe4dcbe --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,55 @@ +# Contributing + +Contributions are highly welcome, however, except for very small changes, kindly file an issue and let's have a discussion before you open a pull request. + +## Building The Project + +Clone this repo: + +```bash +git clone https://github.com/tonerdo/coverlet +``` + +Change directory to repo root: + +```bash +cd coverlet +``` + +Execute build script: + +```bash +dotnet msbuild build.proj +``` + +This will result in the following: + +* Restore all NuGet packages required for building +* Build and publish all projects. Final binaries are placed into `\build\` +* Build and run tests + +These steps must be followed before you attempt to open the solution in an IDE (e.g. Visual Studio, Rider) for all projects to be loaded successfully. + +## Performance testing + +There is a simple performance test for the hit counting instrumentation in the test project `coverlet.core.performancetest`. Build the project with the msbuild step above and then run: + + dotnet test /p:CollectCoverage=true test/coverlet.core.performancetest/ + +The duration of the test can be tweaked by changing the number of iterations in the `[InlineData]` in the `PerformanceTest` class. + +For more realistic testing it is recommended to try out any changes to the hit counting code paths on large, realistic projects. If you don't have any handy https://github.com/dotnet/corefx is an excellent candidate. [This page](https://github.com/dotnet/corefx/blob/master/Documentation/building/code-coverage.md) describes how to run code coverage tests for both the full solution and for individual projects with coverlet from nuget. Suitable projects (listed in order of escalating test durations): + +* System.Collections.Concurrent.Tests +* System.Collections.Tests +* System.Reflection.Metadata.Tests +* System.Xml.Linq.Events.Tests +* System.Runtime.Serialization.Formatters.Tests + +Change to the directory of the library and run the msbuild code coverage command: + + dotnet msbuild /t:BuildAndTest /p:Coverage=true + +To run with a development version of coverlet call `dotnet run` instead of the installed coverlet version, e.g.: + + dotnet msbuild /t:BuildAndTest /p:Coverage=true /p:CoverageExecutablePath="dotnet run -p C:\...\coverlet\src\coverlet.console\coverlet.console.csproj" diff --git a/README.md b/README.md index 755f84f..a6c8d61 100644 --- a/README.md +++ b/README.md @@ -402,59 +402,7 @@ If you're using [Cake Build](https://cakebuild.net) for your build script you ca ## Issues & Contributions -If you find a bug or have a feature request, please report them at this repository's issues section. Contributions are highly welcome, however, except for very small changes, kindly file an issue and let's have a discussion before you open a pull request. - -### Building The Project - -Clone this repo: - -```bash -git clone https://github.com/tonerdo/coverlet -``` - -Change directory to repo root: - -```bash -cd coverlet -``` - -Execute build script: - -```bash -dotnet msbuild build.proj -``` - -This will result in the following: - -* Restore all NuGet packages required for building -* Build and publish all projects. Final binaries are placed into `\build\` -* Build and run tests - -These steps must be followed before you attempt to open the solution in an IDE (e.g. Visual Studio, Rider) for all projects to be loaded successfully. - -### Performance testing - -There is a simple performance test for the hit counting instrumentation in the test project `coverlet.core.performancetest`. Build the project with the msbuild step above and then run: - - dotnet test /p:CollectCoverage=true test/coverlet.core.performancetest/ - -The duration of the test can be tweaked by changing the number of iterations in the `[InlineData]` in the `PerformanceTest` class. - -For more realistic testing it is recommended to try out any changes to the hit counting code paths on large, realistic projects. If you don't have any handy https://github.com/dotnet/corefx is an excellent candidate. [This page](https://github.com/dotnet/corefx/blob/master/Documentation/building/code-coverage.md) describes how to run code coverage tests for both the full solution and for individual projects with coverlet from nuget. Suitable projects (listed in order of escalating test durations): - -* System.Collections.Concurrent.Tests -* System.Collections.Tests -* System.Reflection.Metadata.Tests -* System.Xml.Linq.Events.Tests -* System.Runtime.Serialization.Formatters.Tests - -Change to the directory of the library and run the msbuild code coverage command: - - dotnet msbuild /t:BuildAndTest /p:Coverage=true - -To run with a development version of coverlet call `dotnet run` instead of the installed coverlet version, e.g.: - - dotnet msbuild /t:BuildAndTest /p:Coverage=true /p:CoverageExecutablePath="dotnet run -p C:\...\coverlet\src\coverlet.console\coverlet.console.csproj" +If you find a bug or have a feature request, please report them at this repository's issues section. See the [CONTRIBUTING GUIDE](CONTRIBUTING.md) for details on building and contributing to this project. ## Code of Conduct