-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iq based exporter, using cargo json data #275
Conversation
I'm probably doing something wrong, but I can't get [jobs.bacon-ls]
command = ["cargo", "clippy", "--message-format", "json"]
analyzer = "cargo_json"
[exports.cargo-json-spans]
auto = true
exporter = "analyzer"
line_format = "{diagnostic.level}:{span.file_name}:{span.line_start}:{span.line_end}:{span.col_start}:{span.col_end}:{diagnostic.message}" The bacon UI is empty when the job runs and completes, and the log with a level of Bacon log
Let me know if anything if obviously incorrect, here! |
Change your job definition to
|
If it's confirmed this (analyzer+exporter) pair is useful, I'll work on improving the logs when the command output doesn't match the analyzer expectation. |
I am having troubles understanding how to configure bacon to produce the export location. I have tried with this config [jobs.bacon-ls]
command = [
"cargo", "clippy",
"--message-format", "json-diagnostic-rendered-ansi",
]
analyzer = "cargo_json"
need_stdout = true
[exports.cargo-json-spans]
auto = true
exporter = "Locations"
line_format = "{diagnostic.level}:{span.file_name}:{span.line_start}:{span.line_end}:{span.col_start}:{span.col_end}:{diagnostic.message}" But the location file contains only colons:
|
This adds a new exporter category allowing analyzers do produce the exported file.
The cargo_json analyzer exports the data of cargo's metadata
Diagnostic
andDiagnosticSpan
, one line per span with a "field path" based syntax.The bacon.toml file has an example of such export:
Fix #249