https://github.com/green-code-initiative/creedengo-csharp-test-project
Tests for the latest version of the ecoCode-csharp NuGet package.
https://github.com/green-code-initiative/creedengo-csharp-test-project
csharp ecodesign testing
Last synced: about 1 year ago
JSON representation
Tests for the latest version of the ecoCode-csharp NuGet package.
- Host: GitHub
- URL: https://github.com/green-code-initiative/creedengo-csharp-test-project
- Owner: green-code-initiative
- License: gpl-3.0
- Created: 2024-04-09T19:44:54.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-09T09:02:45.000Z (over 1 year ago)
- Last Synced: 2025-02-09T10:19:17.692Z (over 1 year ago)
- Topics: csharp, ecodesign, testing
- Language: C#
- Homepage: https://green-code-initiative.org
- Size: 78.1 KB
- Stars: 3
- Watchers: 5
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A project that can be used to test the latest version of the [creedengo-csharp](https://github.com/green-code-initiative/creedengo-csharp) NuGet package.
### 1. Set up your local environment
- Install/update the .NET SDK on your machine, the minimum required version is specified in the creedengo-charp's [global.json](https://github.com/green-code-initiative/creedengo-csharp/blob/main/global.json) file.
- Clone this repository locally on your machine. Since this project is used to test the very latest creedengo-csharp rules, including the beta versions, it is recommended to check it out often.
- Optional : install the IDE of your choice for C# (e.g. Visual Studio, Visual Studio Code, Rider, etc.) if you want to test with a GUI.
### 2. Test the rules through the CLI
- Open a command window and navigate to the solution directory.
- Run the following commands: ```dotnet clean``` then ```dotnet build```
- The 2nd command output will contain all the rules violations in the project.
### 3. Test the rules in your IDE
- Open your IDE and load the solution.
- Rebuild the solution, to make sure the NuGet packages are restored and all the code is re-analyzed.
- Open the error list window in your IDE, you should see all the rules violations in the project.
- Open one of the EC*.cs files in the project, you should see the rules violations highlighted in the code.
- For the rules that support generated code fixes, you can use your IDE's quick action to see what the analyzers automatically propose to fix the issues.