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

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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