Skip to content

A tool for collecting historical metrics about a project's dependencies

License

Notifications You must be signed in to change notification settings

corgibytes/freshli-lib

Folders and files

NameName
Last commit message
Last commit date
Sep 8, 2022
Nov 14, 2021
Sep 8, 2022
Sep 8, 2022
Sep 8, 2022
Sep 8, 2022
Sep 8, 2022
Mar 17, 2021
May 5, 2021
Jul 6, 2020
Apr 30, 2021
Nov 18, 2020
Nov 3, 2021
Nov 14, 2021
Sep 8, 2022
May 30, 2020
Jul 29, 2022
Oct 1, 2021
Mar 17, 2021
Mar 16, 2021
Feb 15, 2021
May 30, 2020
Dec 18, 2021
Nov 10, 2021
Mar 11, 2021

Repository files navigation

.NET Core Docker Image CI EditorConfig Lint Maintainability Test Coverage

Freshli-Lib

A library for computing historical metrics about a project's dependencies.

If you are looking for a completed application please see the Freshli CLI or Freshli Website.

Getting Started

Freshli-Lib is a available as a NuGet package. You can install it using your favoriate IDE GUI or by running the following command:

dotnet add package Corgibytes.Freshli.Lib

An example of using Freshli-Lib:

using Corgibytes.Freshli.Lib;

// The runner takes the path to your repository.
var runner = new Runner();
var results = runner.Run(repositoryUrl);

// You can view both the manifest file name and a collection of metric results
Console.WriteLine(results.Filename);
Console.WriteLine(results.MetricsResults);

// You can also output the entire ScanResult
Console.WriteLine(results[0].ToString());

Alpha Packages

If you like living on the edge you can find alpha versions of Freshli Lib here. You will need to set up a GitHub personal access token and then create a nuget.config file in your project root with the following contents:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <packageSources>
        <add key="GithubPackages" value="https://nuget.pkg.github.com/corgibytes/index.json" />
    </packageSources>
    <packageSourceCredentials>
        <GithubPackages>
            <add key="Username" value="GITHUB_USERNAME" />
            <add key="ClearTextPassword" value="PERSONAL_ACCESS_TOKEN" />
        </GithubPackages>
    </packageSourceCredentials>
</configuration>

Supported Dependency Managers

The dependency managers that Freshli supports are listed below along with the manifest files it can parse. The manifest file is the file that lists what dependencies are required by the project and has changed over time for some dependency managers, like NuGet.

Dependency Manager Language/Framework Manifest Files Format
Bundler Ruby, Ruby on Rails Gemfile.lock
Carton Perl cpanfile
Composer PHP composer.json, composer.lock
Pip Python requirements.txt
NuGet C# *.csproj

Please let us know what other dependency managers and/or manifest files you would like use to support via the contact information in the Contributing section.

Supported Source Control Tools

Freshli reads source code repository history to access previous version of each dependency manifest. Currently Freshli only supports Git but if you would like us to add more let us know via the contact information in the Contributing section.

Contributing to Freshli-Lib

If you have any questions, notice a bug, or have a suggestion/enhancment please let us know by opening a issue or pull request. More information can be found at the Contributing Guide