@@ -160,17 +160,16 @@ pub fn config_for_role_and_group<'a>(
160160 Ok ( result)
161161}
162162
163- #[ allow( clippy:: doc_overindented_list_items) ]
164163/// Given the configuration parameters of all `roles` partition them by `PropertyNameKind` and
165164/// merge them with the role groups configuration parameters.
166165///
167166/// The output is a map keyed by the role names. The value is also a map keyed by role group names and
168167/// the values are the merged configuration properties "bucketed" by `PropertyNameKind`.
169168///
170169/// # Arguments
171- /// - `resource` - Not used directly. It's passed on to the `Configuration::compute_*` calls.
172- /// - `roles` - A map keyed by role names. The value is a tuple of a vector of `PropertyNameKind`
173- /// like (Cli, Env or Files) and [`crate::role_utils::Role`] with a boxed [`Configuration`].
170+ /// - `resource`: Not used directly. It's passed on to the `Configuration::compute_*` calls.
171+ /// - `roles`: A map keyed by role names. The value is a tuple of a vector of `PropertyNameKind`
172+ /// like (Cli, Env or Files) and [`crate::role_utils::Role`] with a boxed [`Configuration`].
174173#[ allow( clippy:: type_complexity) ]
175174pub fn transform_all_roles_to_config < T , U , ProductSpecificCommonConfig > (
176175 resource : & T :: Configurable ,
@@ -198,20 +197,19 @@ where
198197 Ok ( result)
199198}
200199
201- #[ allow( clippy:: doc_overindented_list_items) ]
202200/// Validates a product configuration for all roles and role_groups. Requires a valid product config
203201/// and [`RoleConfigByPropertyKind`] which can be obtained via `transform_all_roles_to_config`.
204202///
205203/// # Arguments
206- /// - `version` - The version of the product to be configured.
207- /// - `role_config` - Collected information about all roles, role groups, required
208- /// properties sorted by config files, CLI parameters and ENV variables.
209- /// - `product_config` - The [`product_config::ProductConfigManager`] used to validate the provided
210- /// user data.
211- /// - `ignore_warn` - A switch to ignore product config warnings and continue with
212- /// the value anyways. Not recommended!
213- /// - `ignore_err` - A switch to ignore product config errors and continue with
214- /// the value anyways. Not recommended!
204+ /// - `version`: The version of the product to be configured.
205+ /// - `role_config`: Collected information about all roles, role groups, required properties sorted
206+ /// by config files, CLI parameters and ENV variables.
207+ /// - `product_config`: The [`product_config::ProductConfigManager`] used to validate the provided
208+ /// user data.
209+ /// - `ignore_warn`: A switch to ignore product config warnings and continue with the value anyways.
210+ /// Not recommended!
211+ /// - `ignore_err`: A switch to ignore product config errors and continue with the value anyways.
212+ /// Not recommended!
215213pub fn validate_all_roles_and_groups_config (
216214 version : & str ,
217215 role_config : & RoleConfigByPropertyKind ,
@@ -241,22 +239,21 @@ pub fn validate_all_roles_and_groups_config(
241239 Ok ( result)
242240}
243241
244- #[ allow( clippy:: doc_overindented_list_items) ]
245242/// Calculates and validates a product configuration for a role and group. Requires a valid
246243/// product config and existing [`RoleConfigByPropertyKind`] that can be obtained via
247244/// `transform_all_roles_to_config`.
248245///
249246/// # Arguments
250- /// - `role` - The name of the role
251- /// - `version` - The version of the product to be configured.
252- /// - `properties_by_kind` - Config properties sorted by PropertyKind
253- /// and the resulting user configuration data. See [`RoleConfigByPropertyKind`].
254- /// - `product_config` - The [`product_config::ProductConfigManager`] used to validate the provided
255- /// user data.
256- /// - `ignore_warn` - A switch to ignore product config warnings and continue with
257- /// the value anyways. Not recommended!
258- /// - `ignore_err` - A switch to ignore product config errors and continue with
259- /// the value anyways. Not recommended!
247+ /// - `role`: The name of the role
248+ /// - `version`: The version of the product to be configured.
249+ /// - `properties_by_kind`: Config properties sorted by PropertyKind and the resulting user
250+ /// configuration data. See [`RoleConfigByPropertyKind`].
251+ /// - `product_config`: The [`product_config::ProductConfigManager`] used to validate the provided
252+ /// user data.
253+ /// - `ignore_warn`: A switch to ignore product config warnings and continue with the value anyways.
254+ /// Not recommended!
255+ /// - `ignore_err`: A switch to ignore product config errors and continue with the value anyways.
256+ /// Not recommended!
260257fn validate_role_and_group_config (
261258 version : & str ,
262259 role : & str ,
@@ -286,19 +283,18 @@ fn validate_role_and_group_config(
286283 Ok ( result)
287284}
288285
289- #[ allow( clippy:: doc_overindented_list_items) ]
290286/// This transforms the [`product_config::PropertyValidationResult`] back into a pure BTreeMap which can be used
291287/// to set properties for config files, cli or environmental variables.
292288/// Default values are ignored, Recommended and Valid values are used as is. For Warning and
293289/// Error we recommend to not use the values unless you really know what you are doing.
294290/// If you want to use the values anyways please check the "ignore_warn" and "ignore_err" switches.
295291///
296292/// # Arguments
297- /// - `validation_result` - The product config validation result for each property name.
298- /// - `ignore_warn` - A switch to ignore product config warnings and continue with
299- /// the value anyways. Not recommended!
300- /// - `ignore_err` - A switch to ignore product config errors and continue with
301- /// the value anyways. Not recommended!
293+ /// - `validation_result`: The product config validation result for each property name.
294+ /// - `ignore_warn`: A switch to ignore product config warnings and continue with the value anyways.
295+ /// Not recommended!
296+ /// - `ignore_err`: A switch to ignore product config errors and continue with the value anyways.
297+ /// Not recommended!
302298// TODO: boolean flags suck, move ignore_warn to be a flag
303299fn process_validation_result (
304300 validation_result : & BTreeMap < String , PropertyValidationResult > ,
0 commit comments