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
4 changes: 4 additions & 0 deletions CodeSmellAuditor.Core.Tests/AuditEngineTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public async Task AuditFileAsync_WritesReportAndReturnsPassFailResult()
Assert.False(result.HasPassed);
Assert.True(File.Exists(result.ReportPath));

string reportFileName = Path.GetFileName(result.ReportPath);
Assert.StartsWith("Sample_", reportFileName);
Assert.EndsWith("_Critique.md", reportFileName);

string savedReport = await File.ReadAllTextAsync(result.ReportPath);
Assert.Contains("TargetFile: Sample.cs", savedReport);
Assert.Contains("Status: REVIEW REQUIRED", savedReport);
Expand Down
2 changes: 1 addition & 1 deletion CodeSmellAuditor.Core/AuditEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private static async Task<string> SaveReportToFileSystemAsync(
string markdownContent)
{
string timestamp = DateTime.Now.ToString("yyyyMMdd_HHmmss");
string cleanFileName = $"{timestamp}_{Path.GetFileNameWithoutExtension(targetFileName)}_Critique.md";
string cleanFileName = $"{Path.GetFileNameWithoutExtension(targetFileName)}_{timestamp}_Critique.md";
string fullOutputPath = Path.Combine(targetFolder, cleanFileName);

var documentBuilder = new StringBuilder();
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This is an **AI-assisted semantic code reviewer**, not a deterministic static an
- Batch mode via `WorkstationStorage/Targets/` and path-based `sniff` for files in place
- Local Ollama only — source stays on your machine
- Streaming terminal output with Spectre Status spinner until first token
- Timestamped markdown reports under `WorkstationStorage/Reports/`
- Timestamped markdown reports under `WorkstationStorage/Reports/` (`{File}_{yyyyMMdd_HHmmss}_Critique.md`)
- Pass/fail parsed from a `Status:` line in the report; batch and sniff set process exit codes (`0`/`1`)
- Batch mode prints a pass/fail summary after all Targets files; waits for Enter unless `--non-interactive`
- CLI flags: `--model`, `--storage`, `--non-interactive` (env vars `CODESMELL_MODEL` / `CODESMELL_STORAGE` override flags when set)
Expand Down
4 changes: 2 additions & 2 deletions docs/sample-report-excerpt.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ This excerpt shows the report structure generated by CodeSmellAuditor.
## File naming

```
{yyyyMMdd_HHmmss}_{TargetFileNameWithoutExtension}_Critique.md
{TargetFileNameWithoutExtension}_{yyyyMMdd_HHmmss}_Critique.md
```

Example: `20260707_120000_SampleService_Critique.md`
Example: `SampleService_20260707_120000_Critique.md`

## Front matter

Expand Down
Loading