Giter Club home page Giter Club logo

nuget-license's Introduction

Nuget License Utility Tests Quality Gate Status NuGet

A .net core tool to print and validate the licenses of .net code. This tool supports .NET (Core), .NET Standard and .NET Framework projects.

nuget-license tool

Install tool

dotnet tool install --global nuget-license

Uninstall tool

dotnet tool uninstall --global nuget-license

Usage

Usage: nuget-license [options]

Options:

Option Description
-i, --input Project or Solution to be analyzed
-ji, --json-input Similar to -i, --input but providing a file containing a valid JSON Array that contains all projects to be analyzed
-t, --include-transitive When set, the analysis includes transitive packages (dependencies of packages that are directly installed to the project)
-a, --allowed-license-types File containing all allowed licenses in JSON format. If omitted, all licenses are considered to be allowed.
-ignore, --ignored-packages File containing a JSON formatted array containing package names, that should be ignored when validating licenses. Package names specified can contain simple Wildcard characters (*) which are used to match any number of characters. Note that even though a package is ignored, it's transitive dependencies are still validated. This Option is useful e.g. to exclude homegrown nuget packages from validation.
-include-ignored, --include-ignored-packages This flag allows to explicitly include ignored packages in the output.
-mapping, --licenseurl-to-license-mappings When used, this option allows to add to the url to license mapping built into the application (see here)
-override, --override-package-information When used, this option allows to override the package information used for the validation. This makes sure that no attempt is made to get the associated information about the package from the available web resources. This is useful for packages that e.g. provide a license file as part of the nuget package which (at the time of writing) cannot be used for validation and thus requires the package's information to be provided by this option.
-d, --license-information-download-location When used, this option downloads the html content of the license URL to the specified folder. This is done for all NuGet packages that specify a license URL instead of providing the license expression.
-o, --output This Parameter accepts the value table, json or jsonPretty. It allows to select the type of output that should be given. If omitted, the output is given in tabular form.
-err, --error-only This flag allows to print only packages that contain validation errors (if there are any). This allows the user to focus on errors instead of having to deal with many properly validated
-?, -h, --help Show help for the application and exit
--version Show version information of the application and exit

Example tool commands

Show help

nuget-license --help

Validate licenses for .csproj file

nuget-license -i project.csproj

Generate machine readable output

nuget-license -i project.csproj -o jsonPretty

nuget-license's People

Contributors

sensslen avatar tomchavakis avatar svenclaesson avatar mkuckert avatar notofug avatar renovate[bot] avatar alesebi91 avatar bmcdavid avatar rafntor avatar evolu1 avatar jdrst avatar mersadk avatar amis92 avatar bent-rasmussen avatar orbus-dkreivenas avatar fjaouani avatar actuallyrob avatar elangelo avatar axel-stronzik avatar devproffesional avatar jmartasek avatar jpeirson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.