@@ -160,17 +160,16 @@ pub fn config_for_role_and_group<'a>(
160
160
Ok ( result)
161
161
}
162
162
163
- #[ allow( clippy:: doc_overindented_list_items) ]
164
163
/// Given the configuration parameters of all `roles` partition them by `PropertyNameKind` and
165
164
/// merge them with the role groups configuration parameters.
166
165
///
167
166
/// The output is a map keyed by the role names. The value is also a map keyed by role group names and
168
167
/// the values are the merged configuration properties "bucketed" by `PropertyNameKind`.
169
168
///
170
169
/// # 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`].
174
173
#[ allow( clippy:: type_complexity) ]
175
174
pub fn transform_all_roles_to_config < T , U , ProductSpecificCommonConfig > (
176
175
resource : & T :: Configurable ,
@@ -198,20 +197,19 @@ where
198
197
Ok ( result)
199
198
}
200
199
201
- #[ allow( clippy:: doc_overindented_list_items) ]
202
200
/// Validates a product configuration for all roles and role_groups. Requires a valid product config
203
201
/// and [`RoleConfigByPropertyKind`] which can be obtained via `transform_all_roles_to_config`.
204
202
///
205
203
/// # 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!
215
213
pub fn validate_all_roles_and_groups_config (
216
214
version : & str ,
217
215
role_config : & RoleConfigByPropertyKind ,
@@ -241,22 +239,21 @@ pub fn validate_all_roles_and_groups_config(
241
239
Ok ( result)
242
240
}
243
241
244
- #[ allow( clippy:: doc_overindented_list_items) ]
245
242
/// Calculates and validates a product configuration for a role and group. Requires a valid
246
243
/// product config and existing [`RoleConfigByPropertyKind`] that can be obtained via
247
244
/// `transform_all_roles_to_config`.
248
245
///
249
246
/// # 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!
260
257
fn validate_role_and_group_config (
261
258
version : & str ,
262
259
role : & str ,
@@ -286,19 +283,18 @@ fn validate_role_and_group_config(
286
283
Ok ( result)
287
284
}
288
285
289
- #[ allow( clippy:: doc_overindented_list_items) ]
290
286
/// This transforms the [`product_config::PropertyValidationResult`] back into a pure BTreeMap which can be used
291
287
/// to set properties for config files, cli or environmental variables.
292
288
/// Default values are ignored, Recommended and Valid values are used as is. For Warning and
293
289
/// Error we recommend to not use the values unless you really know what you are doing.
294
290
/// If you want to use the values anyways please check the "ignore_warn" and "ignore_err" switches.
295
291
///
296
292
/// # 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!
302
298
// TODO: boolean flags suck, move ignore_warn to be a flag
303
299
fn process_validation_result (
304
300
validation_result : & BTreeMap < String , PropertyValidationResult > ,
0 commit comments