<commit_before>#addin Cake.Coveralls
#tool "nuget:?package=OpenCover"
#tool "nuget:?package=ReportGenerator"
#tool "nuget:?package=coveralls.net"

var target = Argument("target", "Default");

var coverallsToken = EnvironmentVariable("COVERALLS_REPO_TOKEN");
var hasCoveralls = !string.IsNullOrEmpty(coverallsToken);

Task("Clean")
    .Does(() => {
        EnsureDirectoryExists("./artifacts");
        CleanDirectory("./artifacts");
    });

Task("Restore")
    .IsDependentOn("Clean")
    .Does(() => {
        DotNetCoreRestore();
    });

Task("Build")
    .IsDependentOn("Restore")
    .Does(() => {
        DotNetCoreBuild("./src/**/project.json");
        DotNetCoreBuild("./test/**/project.json");
    });

Task("Test")
    .IsDependentOn("Build")
    .Does(() => {
        OpenCover(tool => {
            tool.DotNetCoreTest("./test/CsBenc.Tests");
        },
        new FilePath("./artifacts/result.xml"),
        new OpenCoverSettings());
    });

Task("Report")
    .IsDependentOn("Test")
    .WithCriteria(() => BuildSystem.IsLocalBuild)
    .Does(() => {
        ReportGenerator("./artifacts/result.xml", "./artifacts/CoverageReport");
    });

Task("Coveralls")
    .IsDependentOn("Test")
    .WithCriteria(() => BuildSystem.IsRunningOnAppVeyor && hasCoveralls)
    .Does(() => {
        CoverallsNet("./artifacts/result.xml", CoverallsNetReportType.OpenCover);
    });

Task("Default")
    .IsDependentOn("Coveralls")
    .IsDependentOn("Report")
    .Does(() => {
        Information("Running build");
    });
<commit_msg>Add FsCheck tests to build script<commit_after>#addin Cake.Coveralls
#tool "nuget:?package=OpenCover"
#tool "nuget:?package=ReportGenerator"
#tool "nuget:?package=coveralls.net"

var target = Argument("target", "Default");

var coverallsToken = EnvironmentVariable("COVERALLS_REPO_TOKEN");
var hasCoveralls = !string.IsNullOrEmpty(coverallsToken);

Task("Clean")
    .Does(() => {
        EnsureDirectoryExists("./artifacts");
        CleanDirectory("./artifacts");
    });

Task("Restore")
    .IsDependentOn("Clean")
    .Does(() => {
        DotNetCoreRestore();
    });

Task("Build")
    .IsDependentOn("Restore")
    .Does(() => {
        DotNetCoreBuild("./src/**/project.json");
        DotNetCoreBuild("./test/**/project.json");
    });

Task("Test")
    .IsDependentOn("Build")
    .Does(() => {
        OpenCover(tool => {
                tool.DotNetCoreTest("./test/CsBenc.Tests");
            },
            new FilePath("./artifacts/result.xml"),
            new OpenCoverSettings());

        DotNetCoreTest("./test/CsBenc.Check");
    });

Task("Report")
    .IsDependentOn("Test")
    .WithCriteria(() => BuildSystem.IsLocalBuild)
    .Does(() => {
        ReportGenerator("./artifacts/result.xml", "./artifacts/CoverageReport");
    });

Task("Coveralls")
    .IsDependentOn("Test")
    .WithCriteria(() => BuildSystem.IsRunningOnAppVeyor && hasCoveralls)
    .Does(() => {
        CoverallsNet("./artifacts/result.xml", CoverallsNetReportType.OpenCover);
    });

Task("Default")
    .IsDependentOn("Coveralls")
    .IsDependentOn("Report")
    .Does(() => {
        Information("Running build");
    });

{'fraction_non_alphanumeric': 0.19058154235145386, 'fraction_numerical': 0.0, 'mean_word_length': 3.231283422459893, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '850675', 'n_tokens_mistral': 1030, 'n_tokens_neox': 1003, 'n_words': 128}