<commit_before>//
//  Project.swift
//  MKHProjGen
//
//  Created by <NAME> on 3/15/17.
//  Copyright © 2017 <NAME>. All rights reserved.
//

public
struct Project
{
    public
    typealias BuildConfigurations =
    (
        all: BuildConfiguration.Base,
        debug: BuildConfiguration,
        release: BuildConfiguration
    )
    
    //---
    
    public
    let name: String
    
    //---
    
    public
    var configurations: BuildConfigurations =
    (
        BuildConfiguration.Base(
            // nothing on this level
        ),
        BuildConfiguration.Defaults.General.debug(
            //
        ),
        BuildConfiguration.Defaults.General.release(
            //
        )
    )
    
    public private(set)
    var targets: [Target] = []
    
    //---
    
    public
    init(
        _ name: String,
        _ configureProject: (inout Project) -> Void
        )
    {
        self.name = name
        
        //---
        
        configureProject(&self)
    }
    
    //===<commit_msg>Made ‘configurations’ of the project more restricted<commit_after>//
//  Project.swift
//  MKHProjGen
//
//  Created by <NAME> on 3/15/17.
//  Copyright © 2017 <NAME>. All rights reserved.
//

public
struct Project
{
    public
    final
    class BuildConfigurations
    {
        public
        var all = BuildConfiguration.Base()
        
        public
        var debug = BuildConfiguration.Defaults.General.debug()
        
        public
        var release = BuildConfiguration.Defaults.General.release()
    }
    
    //---
    
    public
    let name: String
    
    //---
    
    public
    let configurations = BuildConfigurations()
    
    public private(set)
    var targets: [Target] = []
    
    //---
    
    public
    init(
        _ name: String,
        _ configureProject: (inout Project) -> Void
        )
    {
        self.name = name
        
        //---
        
        configureProject(&self)
    }
    
    //===
{'fraction_non_alphanumeric': 0.10880566801619433, 'fraction_numerical': 0.009109311740890687, 'mean_word_length': 1.347980997624703, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7287209', 'n_tokens_mistral': 582, 'n_tokens_neox': 556, 'n_words': 122}