While Bacon was initially developed for the Rust language, it covers more and more tools and language.
For most of them, a dedicated analyzer must be specified in the job settings.
This page is an overview of the supported tools and how bacon can be configured for them.
Some analyzers are flagged as young: it means some feedback would be welcome, either in the chat (if positive) or as GitHub issue (if negative).
Summary
| Analyzer | Languages | Tool |
|---|---|---|
| standard (default) | Rust | cargo check, build, test, clippy, doc, run, miri |
| cargo_json | Rust | cargo with --message-format json-diagnostic-rendered-ansi |
| nextest | Rust | cargo-nextest |
| cpp | C++ | Clang and GCC |
| cpp_doctest | C++ | doctest. |
| biome | JS/TS/CSS | Biome |
| eslint | JS/TS/CSS | ESLint |
| go | Go | go |
| python_pytest | Python | pytest |
| python_ruff | Python | ruff |
| python_unittest | Python | Unittest |
| swift_build | Swift | swift build |
| swift_lint | Swift | swift lint |
| typescript | TS | tsc |
Rust
Rust specific support of bacon includes reading Cargo.toml files to identify all source directories, and help managing cargo features.
Cargo build, clippy, test, doc, run
Status: mature
These tools produce warnings, errors, test failures, with the same representation.
Bacon comes with preconfigured modifiable jobs for them, and you can add some with no explicit analyzer according to your specific needs, for example
[jobs.nightly-clippy]
command = [
"cargo",
"+nightly",
"clippy",
"--all-targets",
"--",
"-A", "clippy::bool_to_int_with_if",
]
Cargo/JSON
Status: mature
Cargo can be configured to output JSON.
[jobs.json-check]
command = [
"cargo", "check",
"--message-format", "json-diagnostic-rendered-ansi",
]
need_stdout = true
analyzer = "cargo_json"
With the cargo_json analyzer, the visible result in bacon is the same, but using this analyzer makes it possible to export from bacon more detailed data to use in other tools, eg bacon-ls.
Miri
Status: mature
miri is supported with the default analyzer.
Bacon isn’t preconfigured for miri but you can add a job with
[jobs.miri]
command = ["cargo", "+nightly", "miri", "run"]
need_stdout = true
Nextest
Status: mature
It doesn’t use the standard analyzer but bacon comes preconfigured with a nextest job so that you can launch bacon nextest or simply hit n while in bacon.
C++
GCC / Clang
Status: young
[jobs.gcc]
command = [
"g++", "-Wall", "src/main.cpp",
]
watch = ["src"]
need_stdout = true
analyzer = "cpp"
Go
Go build
Status: young
Example configuration:
command = [
"go", "build",
"-v",
"./...",
]
need_stdout = true
analyzer = "go"
watch = ["."]
Python
Support of Python is just starting, and Python developers should raise their hand if they want to see progress here.
Pytest
Status: young
It’s configured with
[jobs.pytest]
command = [
"pytest"
]
need_stdout = true
analyzer = "python_pytest"
watch = ["."]
Ruff
Status: young
Example configuration:
[jobs.ruff]
env.FORCE_COLOR = "1"
command = [
"ruff", "check",
]
need_stdout = true
analyzer = "python_ruff"
watch = ["."]
Unittest
Status: young
Support for the Unittest framework seems to work, but lacks testers and users.
Example configuration:
[jobs.unittest]
command = [
"python3", "unitest_runner.py",
]
need_stdout = true
analyzer = "python_unittest"
watch = ["."]
JavaScript / TypeScript
Biome
Status: mature
Example configuration (for a ./libs folder) with some lint rules skipped:
[jobs.biome-libs]
env.RAYON_NUM_THREADS = "1" # for constant ordering of items
command = [
"npx", "@biomejs/biome", "lint",
"--colors", "force",
"./libs",
"--skip", "complexity/useArrowFunction",
"--skip", "style/useTemplate",
]
need_stdout = true
analyzer = "biome"
watch = ["libs"]
Eslint
Status: young
[jobs.lint]
command = ["npx", "eslint", "--color", "libs/*"]
need_stdout = true
analyzer = "eslint"
watch = ["libs"]
TypeScript
Status: young
Example configuration:
command = [
"tsc",
"--noEmit", "--pretty",
]
analyzer = "typescript"
need_stdout = true
watch = ["src"]
Swift
Status: young
Swift build
Example configuration:
[jobs.swift_build]
command = ["swift", "build"]
watch = ["Sources"]
need_stdout = true
analyzer = "swift_build"
Swift lint
Example configuration:
command = ["swiftlint", "lint", "--config", ".swiftlint.yml", "--strict"]
watch = ["Sources"]
need_stdout = true
analyzer = "swift_lint"
Other tools
What’s not here, you should probably ask for it, either on GitHub or on the Miaou chat.