diff --git a/CheckMate.ps1 b/CheckMate.ps1 index ecb317b..5384e54 100644 --- a/CheckMate.ps1 +++ b/CheckMate.ps1 @@ -12,23 +12,30 @@ (optional) Specifies the output path for the report - will be generated inside the repoPath otherwise. .EXAMPLE - ./CheckMate.ps1 -RepoRoot "." -ReportPath "CheckResults.md" + Run only the checks from the `checks/Sanity` directory on the `./MySolution/MyProject` path and generate a `ChecksResult.md` file with the results: + + ./CheckMate.ps1 -RepoRoot "./MySolution/ProjectDirectory" -ReportPath "CheckResults.md" -ChecksBasePath "checks/Sanity" #> param( - # Repository-Root: Standardwert ist das aktuelle Verzeichnis + # Root directory to run the checks for [string]$RepoRoot = ".", - # Protokolldatei: Standardwert im RepoRoot + # Base directory for the checks to run (relative to this script) + [string]$ChecksBasePath = "checks", + + # name of the report file to be created [string]$ReportPath = "$(get-date -f yyyy-MM-dd-HH-mm-ss)_autoreview-report.md" + + # ) Import-Module "$PSScriptRoot/common/MarkdownReport.psd1" # Absolute Pfade berechnen $RepoRoot = (Resolve-Path $RepoRoot).Path -$checkFolder = Join-Path $PSScriptRoot "checks" +$checkFolder = Join-Path $PSScriptRoot $ChecksBasePath $reportFile = if ([System.IO.Path]::IsPathRooted($ReportPath)) { $ReportPath } else { diff --git a/README.md b/README.md index 9a69251..4d0a2f0 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,12 @@ You can run `CheckMate.ps1` without adding any additional parameter: ./CheckMate.ps1 ``` -CheckMate will fall back to its current directory a test object and generate a report file by itself. +CheckMate will fall back to its current directory a test object, use the `checks` directory for the tests to run and generate a report file by itself. -You can change this by using the corresponding parameters: +Anyhow, you can alter these default configuration by using the corresponding parameters: ```powershell -./CheckMate.ps1 -repoPath "." -ReportPath "CheckResults.md" +./CheckMate.ps1 -repoPath "." -ChecksBasePath "./checks/Sanity" -ReportPath "CheckResults.md" ``` ## License