From 5bbd5510a16e6ff3ebffb0d6740a230aa879bc5e Mon Sep 17 00:00:00 2001 From: Marcel Pfennig <82059270+MP-Tool@users.noreply.github.com> Date: Wed, 20 Aug 2025 03:31:23 +0200 Subject: [PATCH] Fix: Example code blocks got interpreted as rust code, leading to compilation errors (#743) --- client/core/rs/src/api/execute/action.rs | 2 +- client/core/rs/src/api/execute/build.rs | 2 +- client/core/rs/src/api/execute/deployment.rs | 4 ++-- client/core/rs/src/api/execute/procedure.rs | 2 +- client/core/rs/src/api/execute/repo.rs | 6 +++--- client/core/rs/src/api/execute/stack.rs | 8 ++++---- client/core/rs/src/api/mod.rs | 4 ++-- client/core/rs/src/api/read/alert.rs | 2 +- client/core/rs/src/entities/action.rs | 4 ++-- client/core/rs/src/entities/procedure.rs | 4 ++-- client/core/rs/src/lib.rs | 6 +++--- client/core/rs/src/ws.rs | 2 +- client/periphery/rs/src/terminal.rs | 4 ++-- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/client/core/rs/src/api/execute/action.rs b/client/core/rs/src/api/execute/action.rs index cee479cc7..1a6113b35 100644 --- a/client/core/rs/src/api/execute/action.rs +++ b/client/core/rs/src/api/execute/action.rs @@ -60,7 +60,7 @@ pub struct BatchRunAction { /// Supports multiline and comma delineated combinations of the above. /// /// Example: - /// ``` + /// ```text /// # match all foo-* actions /// foo-* /// # add some more diff --git a/client/core/rs/src/api/execute/build.rs b/client/core/rs/src/api/execute/build.rs index 0efc0efb1..9adf37e9c 100644 --- a/client/core/rs/src/api/execute/build.rs +++ b/client/core/rs/src/api/execute/build.rs @@ -64,7 +64,7 @@ pub struct BatchRunBuild { /// Supports multiline and comma delineated combinations of the above. /// /// Example: - /// ``` + /// ```text /// # match all foo-* builds /// foo-* /// # add some more diff --git a/client/core/rs/src/api/execute/deployment.rs b/client/core/rs/src/api/execute/deployment.rs index 67ea89215..cbcbdf8f3 100644 --- a/client/core/rs/src/api/execute/deployment.rs +++ b/client/core/rs/src/api/execute/deployment.rs @@ -62,7 +62,7 @@ pub struct BatchDeploy { /// Supports multiline and comma delineated combinations of the above. /// /// Example: - /// ``` + /// ```text /// # match all foo-* deployments /// foo-* /// # add some more @@ -270,7 +270,7 @@ pub struct BatchDestroyDeployment { /// Supports multiline and comma delineated combinations of the above. /// /// Example: - /// ``` + /// ```text /// # match all foo-* deployments /// foo-* /// # add some more diff --git a/client/core/rs/src/api/execute/procedure.rs b/client/core/rs/src/api/execute/procedure.rs index 983d41427..cb22922b7 100644 --- a/client/core/rs/src/api/execute/procedure.rs +++ b/client/core/rs/src/api/execute/procedure.rs @@ -48,7 +48,7 @@ pub struct BatchRunProcedure { /// Supports multiline and comma delineated combinations of the above. /// /// Example: - /// ``` + /// ```text /// # match all foo-* procedures /// foo-* /// # add some more diff --git a/client/core/rs/src/api/execute/repo.rs b/client/core/rs/src/api/execute/repo.rs index 0e0fed797..c69304299 100644 --- a/client/core/rs/src/api/execute/repo.rs +++ b/client/core/rs/src/api/execute/repo.rs @@ -60,7 +60,7 @@ pub struct BatchCloneRepo { /// Supports multiline and comma delineated combinations of the above. /// /// Example: - /// ``` + /// ```text /// # match all foo-* repos /// foo-* /// # add some more @@ -118,7 +118,7 @@ pub struct BatchPullRepo { /// Supports multiline and comma delineated combinations of the above. /// /// Example: - /// ``` + /// ```text /// # match all foo-* repos /// foo-* /// # add some more @@ -180,7 +180,7 @@ pub struct BatchBuildRepo { /// Supports multiline and comma delineated combinations of the above. /// /// Example: - /// ``` + /// ```text /// # match all foo-* repos /// foo-* /// # add some more diff --git a/client/core/rs/src/api/execute/stack.rs b/client/core/rs/src/api/execute/stack.rs index b6e992241..ed5561956 100644 --- a/client/core/rs/src/api/execute/stack.rs +++ b/client/core/rs/src/api/execute/stack.rs @@ -57,7 +57,7 @@ pub struct BatchDeployStack { /// Supports multiline and comma delineated combinations of the above. /// /// Example: - /// ``` + /// ```text /// # match all foo-* stacks /// foo-* /// # add some more @@ -115,7 +115,7 @@ pub struct BatchDeployStackIfChanged { /// Supports multiline and comma delineated combinations of the above. /// /// Example: - /// ``` + /// ```text /// # match all foo-* stacks /// foo-* /// # add some more @@ -172,7 +172,7 @@ pub struct BatchPullStack { /// Supports multiline and comma delineated combinations of the above. /// /// Example: - /// ``` + /// ```text /// # match all foo-* stacks /// foo-* /// # add some more @@ -368,7 +368,7 @@ pub struct BatchDestroyStack { /// Supports multiline and comma delineated combinations of the above. ///d /// Example: - /// ``` + /// ```text /// # match all foo-* stacks /// foo-* /// # add some more diff --git a/client/core/rs/src/api/mod.rs b/client/core/rs/src/api/mod.rs index 1e2905de1..b52dc0d38 100644 --- a/client/core/rs/src/api/mod.rs +++ b/client/core/rs/src/api/mod.rs @@ -20,7 +20,7 @@ //! the schemas given in [read], [mod@write], [execute], and so on. //! //! For example, this is an example body for [read::GetDeployment]: -//! ``` +//! ```json //! { //! "type": "GetDeployment", //! "params": { @@ -56,7 +56,7 @@ //! //! Request errors will be returned with a JSON body containing information about the error. //! They will have the following common format: -//! ``` +//! ```json //! { //! "error": "top level error message", //! "trace": [ diff --git a/client/core/rs/src/api/read/alert.rs b/client/core/rs/src/api/read/alert.rs index 3a679b966..c4d7f31ba 100644 --- a/client/core/rs/src/api/read/alert.rs +++ b/client/core/rs/src/api/read/alert.rs @@ -20,7 +20,7 @@ pub struct ListAlerts { /// Pass a custom mongo query to filter the alerts. /// /// ## Example JSON - /// ``` + /// ```json /// { /// "resolved": "false", /// "level": "CRITICAL", diff --git a/client/core/rs/src/entities/action.rs b/client/core/rs/src/entities/action.rs index 46d23b1f6..ff39fc632 100644 --- a/client/core/rs/src/entities/action.rs +++ b/client/core/rs/src/entities/action.rs @@ -91,13 +91,13 @@ pub struct ActionConfig { /// 1. Regular CRON expression: /// /// (second, minute, hour, day, month, day-of-week) - /// ``` + /// ```text /// 0 0 0 1,15 * ? /// ``` /// /// 2. "English" expression via [english-to-cron](https://crates.io/crates/english-to-cron): /// - /// ``` + /// ```text /// at midnight on the 1st and 15th of the month /// ``` #[serde(default)] diff --git a/client/core/rs/src/entities/procedure.rs b/client/core/rs/src/entities/procedure.rs index 623663304..53de21135 100644 --- a/client/core/rs/src/entities/procedure.rs +++ b/client/core/rs/src/entities/procedure.rs @@ -91,13 +91,13 @@ pub struct ProcedureConfig { /// 1. Regular CRON expression: /// /// (second, minute, hour, day, month, day-of-week) - /// ``` + /// ```text /// 0 0 0 1,15 * ? /// ``` /// /// 2. "English" expression via [english-to-cron](https://crates.io/crates/english-to-cron): /// - /// ``` + /// ```text /// at midnight on the 1st and 15th of the month /// ``` #[serde(default)] diff --git a/client/core/rs/src/lib.rs b/client/core/rs/src/lib.rs index 12f21c0fc..2f1f438ef 100644 --- a/client/core/rs/src/lib.rs +++ b/client/core/rs/src/lib.rs @@ -15,7 +15,7 @@ //! - `KOMODO_API_SECRET` //! //! ## Client Example -//! ``` +//! ```text //! dotenvy::dotenv().ok(); //! //! let client = KomodoClient::new_from_env()?; @@ -109,7 +109,7 @@ impl KomodoClient { /// Add a healthcheck in the initialization pipeline: /// - /// ```rust + /// ```text /// let komodo = KomodoClient::new_from_env()? /// .with_healthcheck().await?; /// ``` @@ -121,7 +121,7 @@ impl KomodoClient { /// Add a healthcheck in the initialization pipeline: /// - /// ```rust + /// ```text /// let komodo = KomodoClient::new_from_env()? /// .with_healthcheck().await?; /// ``` diff --git a/client/core/rs/src/ws.rs b/client/core/rs/src/ws.rs index 78b6527c8..b2cd68702 100644 --- a/client/core/rs/src/ws.rs +++ b/client/core/rs/src/ws.rs @@ -61,7 +61,7 @@ impl KomodoClient { /// and forwards the updates over a channel. /// Handles reconnection internally. /// - /// ``` + /// ```text /// let (mut rx, _) = komodo.subscribe_to_updates()?; /// loop { /// let update = match rx.recv().await { diff --git a/client/periphery/rs/src/terminal.rs b/client/periphery/rs/src/terminal.rs index 8a926d324..926b3115c 100644 --- a/client/periphery/rs/src/terminal.rs +++ b/client/periphery/rs/src/terminal.rs @@ -44,7 +44,7 @@ impl PeripheryClient { /// sentinal value as the expected final line of the stream. /// /// Example final line: - /// ``` + /// ```text /// __KOMODO_EXIT_CODE:0 /// ``` /// @@ -104,7 +104,7 @@ impl PeripheryClient { /// sentinal value as the expected final line of the stream. /// /// Example final line: - /// ``` + /// ```text /// __KOMODO_EXIT_CODE:0 /// ``` ///