You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): implement json, json-pretty, and summary reporters
The CLI advertised these as valid --reporter values but they were not
implemented, causing an error when used. Adds the three missing reporter
variants with snapshot tests.
Closes#694
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: crates/pgls_cli/src/cli_options.rs
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -129,6 +129,12 @@ pub enum CliReporter {
129
129
Junit,
130
130
/// Reports linter diagnostics using the [GitLab Code Quality report](https://docs.gitlab.com/ee/ci/testing/code_quality.html#implement-a-custom-tool).
131
131
GitLab,
132
+
/// Diagnostics are printed as JSON
133
+
Json,
134
+
/// Diagnostics are printed as pretty-printed JSON
135
+
JsonPretty,
136
+
/// Only a summary of diagnostics is printed (counts, no individual diagnostics)
137
+
Summary,
132
138
}
133
139
134
140
implCliReporter{
@@ -145,6 +151,9 @@ impl FromStr for CliReporter {
145
151
"github" => Ok(Self::GitHub),
146
152
"junit" => Ok(Self::Junit),
147
153
"gitlab" => Ok(Self::GitLab),
154
+
"json" => Ok(Self::Json),
155
+
"json-pretty" => Ok(Self::JsonPretty),
156
+
"summary" => Ok(Self::Summary),
148
157
_ => Err(format!(
149
158
"value {s:?} is not valid for the --reporter argument"
150
159
)),
@@ -159,6 +168,9 @@ impl Display for CliReporter {
0 commit comments