Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions CheckMate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down