<commit_before>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using VersionTools.Lib;

namespace VersionTools.Cli {
    public class ProjectScanner {

        public Project[] Scan(Semver version, bool scan = false ) {
            _scan = scan;
            var projects = new List<Project>();

            ScanDirectory(Program.RootDirectory, projects, version );

            return projects.ToArray();
        }

        private void ScanDirectory(DirectoryInfo directory, List<Project> projects, Semver currentVersion) {
            Program.VerboseOut(Verbose.Scanning, "Entering directory {0}", directory.FullName );

            var versionFile = directory.GetFiles("version.txt").SingleOrDefault();
            if (versionFile != null) {
                Program.VerboseOut(Verbose.Scanning, "Found version.txt");
                var parser = new VersionFileParser(versionFile);
                var parsedVersion = parser.GetVersion();<commit_msg>Remove logging of directory entry in verbose mode<commit_after>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using VersionTools.Lib;

namespace VersionTools.Cli {
    public class ProjectScanner {

        public Project[] Scan(Semver version, bool scan = false ) {
            _scan = scan;
            var projects = new List<Project>();

            ScanDirectory(Program.RootDirectory, projects, version );

            return projects.ToArray();
        }

        private void ScanDirectory(DirectoryInfo directory, List<Project> projects, Semver currentVersion) {
            var versionFile = directory.GetFiles("version.txt").SingleOrDefault();
            if (versionFile != null) {
                Program.VerboseOut(Verbose.Scanning, "Found version.txt");
                var parser = new VersionFileParser(versionFile);
                var parsedVersion = parser.GetVersion();
{'fraction_non_alphanumeric': 0.09384775808133472, 'fraction_numerical': 0.0005213764337851929, 'mean_word_length': 2.77755905511811, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2123952', 'n_tokens_mistral': 484, 'n_tokens_neox': 461, 'n_words': 125}