<commit_before>#! /usr/bin/env perl

use strict;
use warnings;
use v5.10;

use Data::Dumper;

my @infiles;
push @infiles, shift;
my @included;


while (scalar @infiles) {

    my $infile = pop @infiles;

    my @lines;
    open (my $handle, '<', $infile) or die "Can't open $infile";
    push @lines, <$handle>;
    close $handle;

    for (grep {/#include\s.(\w+\.h)/} @lines) {
        my ($checkfile) = /(\w+\.h)/;

        if (-f "include/$checkfile" && ! grep {/include\/$checkfile/} @included) {
            push @included, "include/$checkfile";
            push @infiles, "include/$checkfile";
        }

    }

}<commit_msg>Include source file<commit_after>#! /usr/bin/env perl

use strict;
use warnings;
use v5.10;

use Data::Dumper;

my @infiles;
push @infiles, shift;
my @included;

while (scalar @infiles) {

    my $infile = pop @infiles;
    push @included, $infile;

    my @lines;
    open (my $handle, '<', $infile) or die "Can't open $infile";
    push @lines, <$handle>;
    close $handle;

    for (grep {/#include\s.(\w+\.h)/} @lines) {
        my ($checkfile) = /(\w+\.h)/;

        if (-f "include/$checkfile" && ! grep {/include\/$checkfile/} @included) {
            push @infiles, "include/$checkfile";
        }

    }

}
{'fraction_non_alphanumeric': 0.18990384615384615, 'fraction_numerical': 0.004807692307692308, 'mean_word_length': 2.5183098591549298, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '755868', 'n_tokens_mistral': 484, 'n_tokens_neox': 459, 'n_words': 122}