<commit_before>//
//  ResultFormatter.swift
//  xcconfig-extractor
//
//  Created by <NAME> on 2017/04/30.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import Foundation

class ResultFormatter {
    let config: Config
    init(config: Config) {
        self.config = config
    }
    private var header: [String] {
        let signature = "// Generated using xcconfig-extractor \(Config.version) by Toshihiro Suzuki - https://github.com/toshi0383/xcconfig-extractor"
        return [signature]
    }
    private func addInclude(filePath: String) -> String {
        return "#include \"\(filePath)\""
    }
    func format(result: ResultObject, includes: [String] = []) -> [String] {
        return header
            + result.includes.map(addInclude)
            + includes.map(addInclude)
            + result.settings
    }
}<commit_msg>Add new line at the end of xcconfig<commit_after>//
//  ResultFormatter.swift
//  xcconfig-extractor
//
//  Created by <NAME> on 2017/04/30.
//  Copyright © 2017 <NAME>. All rights reserved.
//

import Foundation

class ResultFormatter {
    let config: Config
    init(config: Config) {
        self.config = config
    }
    private var header: [String] {
        let signature = "// Generated using xcconfig-extractor \(Config.version) by Toshihiro Suzuki - https://github.com/toshi0383/xcconfig-extractor"
        return [signature]
    }
    private func addInclude(filePath: String) -> String {
        return "#include \"\(filePath)\""
    }
    func format(result: ResultObject, includes: [String] = []) -> [String] {
        return header
            + result.includes.map(addInclude)
            + includes.map(addInclude)
            + result.settings
            + ["\n"]
    }
}
{'fraction_non_alphanumeric': 0.1276595744680851, 'fraction_numerical': 0.018401380103507763, 'mean_word_length': 2.352601156069364, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '2228485', 'n_tokens_mistral': 537, 'n_tokens_neox': 512, 'n_words': 130}