Conversation
Adds a new `diagnosticReporter` setting in bsconfig.json (and a matching
`--diagnostic-reporter` CLI flag) that lets users pick how diagnostics are
rendered to the console. Accepts a single value or an array, where each
value is a preset name ("detailed", "github-actions"), a custom template
string, or an explicit object form. Multiple reporters can run in the same
build so a CI run can emit detailed terminal output and GitHub Actions PR
annotations simultaneously without a third-party tool.
Invalid reporter values are logged and skipped rather than aborting the
build; if every configured reporter is invalid the build falls back to
"detailed". Schema and docs/bsconfig.md updated.
| * | ||
| * @default "detailed" | ||
| */ | ||
| diagnosticReporter?: DiagnosticReporter | DiagnosticReporter[]; |
There was a problem hiding this comment.
Should this be plural from the start? diagnosticReporters?
There was a problem hiding this comment.
Yes — updated to diagnosticReporters as the primary terminology in commit 3d4e42b (with a compatibility fallback for the singular key).
| for (const reporter of reporters) { | ||
| if (reporter.type === 'github-actions') { | ||
| diagnosticUtils.printDiagnosticGithubActions({ options: options, severity: severity, filePath: filePath, diagnostic: diagnostic }); | ||
| } else if (reporter.type === 'custom') { | ||
| reporter.run({ options: options, severity: severity, filePath: filePath, diagnostic: diagnostic }); | ||
| } else { | ||
| diagnosticUtils.printDiagnostic(options, severity, filePath, lines, diagnostic, relatedInformation); | ||
| } | ||
| } |
There was a problem hiding this comment.
@copilot add tests that make sure reporters are called in the order the user defined them. Cover when configured via bsconfig.json and cli.
There was a problem hiding this comment.
Added reporter-order coverage in ProgramBuilder.spec.ts for both bsconfig-driven and CLI-driven configuration in commit 3d4e42b.
| * | ||
| * @default "detailed" | ||
| */ | ||
| diagnosticReporter?: DiagnosticReporter | DiagnosticReporter[]; |
There was a problem hiding this comment.
@copilot Lets update this terminology to diagnosticReporters
There was a problem hiding this comment.
Terminology has been updated to diagnosticReporters across config/CLI/docs in commit 3d4e42b.
Agent-Logs-Url: https://github.com/rokucommunity/brighterscript/sessions/27a2c50d-7e45-4d54-a66c-e8dfeb705996 Co-authored-by: chrisdp <9591618+chrisdp@users.noreply.github.com>
Summary
diagnosticReportersetting (and--diagnostic-reporterCLI flag) selecting how diagnostics are rendered:"detailed"(default),"github-actions", or a custom{file}:{line}: {message}template"detailed"(never aborts the build)