pub fn handle_project_type_diagnostic(config: &mut ConfigMap) -> Option<ConfigurationDiagnostic> {
    let project_type_infos = get_project_type_infos();
    let property_name = "projectType";
    let has_project_type_config = match config.get(property_name) {
        Some(ConfigMapValue::String(project_type)) => project_type_infos.iter().any(|info| info.name.to_lowercase() == project_type.to_lowercase()),
        _ => false,
    };

    config.remove(property_name);

    if has_project_type_config {
        None
    } else {
        Some(ConfigurationDiagnostic {
            property_name: String::from(property_name),
            message: build_message(&project_type_infos, property_name),
        })
    }
}
/// Checks if the configuration has a missing "projectType" property.
///
/// This is done to encourage companies to support the project. They obviously aren't required to though.
/// Please discuss this with me if you have strong reservations about this. Note that this library took a lot of
/// time, effort, and previous built up knowledge and I'm happy to give it away for free to open source projects,
/// but would like to see companies support it financially even if it's only in a small way.
Checks if the configuration has a missing "projectType" property.
This is done to encourage companies to support the project. They obviously aren't required to though.
Please discuss this with me if you have strong reservations about this. Note that this library took a lot of
time, effort, and previous built up knowledge and I'm happy to give it away for free to open source projects,
but would like to see companies support it financially even if it's only in a small way.
Checks if the configuration has a missing " projectType " property . This is done to encourage companies to support the project . They obviously aren ' t required to though . Please discuss this with me if you have strong reservations about this . Note that this library took a lot of time effort and previous built up knowledge and I ' m happy to give it away for free to open source projects but would like to see companies support it financially even if it ' s only in a small way .
pub fn handle_project_type_diagnostic(config: &mut ConfigMap) -> Option<ConfigurationDiagnostic> {
    let project_type_infos = get_project_type_infos();
    let property_name = "projectType";
    let has_project_type_config = match config.get(property_name) {
        Some(ConfigMapValue::String(project_type)) => project_type_infos.iter().any(|info| info.name.to_lowercase() == project_type.to_lowercase()),
        _ => false,
    };
    config.remove(property_name);
    if has_project_type_config {
        None
    } else {
        Some(ConfigurationDiagnostic {
            property_name: String::from(property_name),
            message: build_message(&project_type_infos, property_name),
        })
    }
}
pub fn handle_project_type_diagnostic ( config : & mut ConfigMap ) -> Option < ConfigurationDiagnostic > { let project_type_infos = get_project_type_infos ( ) ; let property_name = " " ; let has_project_type_config = match config . get ( property_name ) { Some ( ConfigMapValue :: String ( project_type ) ) => project_type_infos . iter ( ) . any ( | info | info . name . to_lowercase ( ) == project_type . to_lowercase ( ) ) , _ => false , } ; config . remove ( property_name ) ; if has_project_type_config { None } else { Some ( ConfigurationDiagnostic { property_name : String :: from ( property_name ) , message : build_message ( & project_type_infos , property_name ) , } ) } }
Checks if the configuration has a missing "projectType" property.
Checks if the configuration has a missing " projectType " property .
config
&mut ConfigMap
config
&mut ConfigMap