While Bacon was initially developped 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.
Summary
Analyzer | Languages | Tool |
---|---|---|
standard (default) | Rust | cargo check , build , test , clippy , doc , run , miri |
nextest | Rust | cargo-nextest |
cargo_json | Rust | cargo with --message-format json-diagnostic-rendered-ansi |
python_unittest | Python | Unittest |
python_pytest | Python | pytest |
python_ruff | Python | ruff |
eslint | JS/TS/CSS | ESLint |
biome | JS/TS/CSS | Biome |
cpp | C++ | Clang and GCC |
cpp_doctest | C++ | doctest. |
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 are quite different but produce warnings, errors, test failures, with the same representation.
Bacon comes preconfigured for those tools.
Cargo/JSON
Status: young
Cargo can be configured to output 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.
Python
Support of Python is just starting, and Python developpers should raise their hand if they want to see progress here.
Unittest
Status: young
Support for the Unittest framework seems to work, but lacks testers and users.
Exemple configuration:
[jobs.unittest]
command = [
"python3", "unitest_runner.py",
]
need_stdout = true
analyzer = "python_unittest"
watch = ["."]
Pytest
Status: young
It's configured with
[jobs.pytest]
command = [
"pytest"
]
need_stdout = true
analyzer = "python_pytest"
watch = ["."]
Ruff
Status: young
Exemple configuration:
[jobs.ruff]
env.FORCE_COLOR = "1"
command = [
"ruff", "check",
]
need_stdout = true
analyzer = "python_ruff"
watch = ["."]
JavaScript / TypeScript
Eslint
Status: young
[jobs.lint]
command = ["npx", "eslint", "--color", "libs/*"]
need_stdout = true
analyzer = "eslint"
watch = ["libs"]
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"]
C++
GCC / Clang
Status: young
[jobs.gcc]
command = [
"g++", "-Wall", "src/main.cpp",
]
watch = ["src"]
need_stdout = true
analyzer = "cpp"
Other tools
What's not here, you should probably ask for it, either on GitHub or on the Miaou chat.