A tool that can analyze C# solutions submitted to Exercism.
To analyze a solution, follow these steps:
- Open a command prompt in the root directory.
- Run
./analyze.ps1 <slug> <directory>
. This script will run the analyzer on the specified directory. - Once the script has completed, the analysis results will be written to
<directory>/analysis.json
.
To analyze multiple solutions at once, follow these steps:
- Open a command prompt in the root directory.
- Run
./bulk-analyze.ps1 <slug> <directory>
. This script will run the analyzer on each directory sub-directory of<directory>
. - Once the script has completed, it will:
- Output general staticics to the console.
- Write detailed analysis results to
<directory>/bulk_analysis.json
.
To analyze a solution using a Docker container, follow these steps:
- Open a command prompt in the root directory.
- Run
./run-in-docker.ps1 <slug> <directory>
. This script will:- Build the analyzer Docker image (if necessary).
- Run the analyzer Docker image (as a container), passing the specified
slug
anddirectory
arguments.
- Once the script has completed, the analysis result can be found at
<directory>/analysis.json
.
Note that the Docker image is built using the .NET IL Linker, which is why building can be quite slow.
This repository uses the dotnet-format tool to format the source code. There are no custom rules; we just use the default formatting. You can format the code by running the ./format.ps1
command.
The scripts in this repository are written in PowerShell. As PowerShell is cross-platform nowadays, you can also install it on Linux and macOS.