build: define detector formatter and LSP targets
This commit is contained in:
parent
95e6930a42
commit
f1ef56b798
13
Cargo.toml
13
Cargo.toml
|
|
@ -5,6 +5,19 @@ edition = "2024"
|
|||
rust-version = "1.88"
|
||||
license = "MIT"
|
||||
repository = "https://git.dandaedre.com/idle-org/john_slop"
|
||||
autobins = false
|
||||
|
||||
[[bin]]
|
||||
name = "john-slop"
|
||||
path = "src/bin/john-slop.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "john-slop-fmt"
|
||||
path = "src/bin/john-slop-fmt.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "john-slop-lsp"
|
||||
path = "src/bin/john-slop-lsp.rs"
|
||||
|
||||
[dependencies]
|
||||
miette = { version = "7.6.0", features = ["fancy"] }
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ pipeline {
|
|||
sh '''
|
||||
set -eu
|
||||
|
||||
echo "Building john_slop release binary..."
|
||||
echo "Building John Slop release binaries..."
|
||||
|
||||
cargo build \
|
||||
--locked \
|
||||
|
|
@ -143,9 +143,10 @@ pipeline {
|
|||
echo
|
||||
echo "Release build completed."
|
||||
|
||||
if [ -f target/release/john_slop ]; then
|
||||
ls -lh target/release/john_slop
|
||||
fi
|
||||
ls -lh \
|
||||
target/release/john-slop \
|
||||
target/release/john-slop-fmt \
|
||||
target/release/john-slop-lsp
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@ The temporary command-line entry point accepts one file, directory, or supported
|
|||
ZIP-based path and prints a summary per document. Its interface will be replaced
|
||||
by the planned Clap-based detector binary during Milestone 1.
|
||||
|
||||
Cargo exposes explicit `john-slop`, `john-slop-fmt`, and `john-slop-lsp` binary
|
||||
targets. The formatter and LSP currently exit with an explanatory unsupported
|
||||
message until their dedicated implementation milestones.
|
||||
|
||||
Reusable consumers should call the library facade: `load_config`,
|
||||
`analyze_source`, `plan_replacements`, and `read_inputs`. Replacement planning is
|
||||
pure and shares the exact resolved configuration used by analysis.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
//! Formatter command-line adapter scaffold.
|
||||
|
||||
use miette::{Result, miette};
|
||||
|
||||
fn main() -> Result<()> {
|
||||
Err(miette!(
|
||||
"john-slop-fmt is not implemented yet; replacement planning is available through the library"
|
||||
))
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
//! Language-server adapter scaffold.
|
||||
|
||||
use miette::{Result, miette};
|
||||
|
||||
fn main() -> Result<()> {
|
||||
Err(miette!(
|
||||
"john-slop-lsp is not implemented yet; LSP support is planned for Milestone 6"
|
||||
))
|
||||
}
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
//! Command-line entry point for the John Slop prototype.
|
||||
|
||||
#![warn(clippy::missing_docs_in_private_items)]
|
||||
#![allow(dead_code)]
|
||||
//! Detector command-line adapter.
|
||||
|
||||
use std::{env, path::Path};
|
||||
|
||||
|
|
@ -11,7 +8,7 @@ use miette::{IntoDiagnostic, Result, WrapErr, miette};
|
|||
fn main() -> Result<()> {
|
||||
let path = env::args_os()
|
||||
.nth(1)
|
||||
.ok_or_else(|| miette!("usage: john_slop <path>"))?;
|
||||
.ok_or_else(|| miette!("usage: john-slop <path>"))?;
|
||||
|
||||
let config = load_config();
|
||||
let documents = read_inputs(&config, Path::new(&path))
|
||||
2
tasks.md
2
tasks.md
|
|
@ -56,7 +56,7 @@ are written down, and a clean baseline passes all quality gates.
|
|||
decompression bombs using the limits from Milestone 0.
|
||||
- [x] Centralize error enums with `thiserror`; add `miette` context only at
|
||||
presentation boundaries. Remove placeholder `try_report` and sample reports.
|
||||
- [ ] Add explicit `[[bin]]` targets for `john-slop`, `john-slop-fmt`, and
|
||||
- [x] Add explicit `[[bin]]` targets for `john-slop`, `john-slop-fmt`, and
|
||||
`john-slop-lsp`; the latter two may initially call stub adapters but all three
|
||||
must compile.
|
||||
- [ ] Keep binary parsing/orchestration out of the library. Add `clap` with derive
|
||||
|
|
|
|||
Loading…
Reference in New Issue