Git Product home page Git Product logo

diligent's People

Contributors

dareid avatar harryrose avatar mariocarrion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

diligent's Issues

Improve whitelisting

Allow users to specify why category of license they will allow. This could feature copyfree and copyleft. Could further allow specification of features of the licenses, like allowing commercial usage, network redistribution and source redistribution

Default whitelist to empty

Currently diligent will accept all licenses if a whitelist is not provided. Change this behaviour.

To allow users to allow all, introduce a -w all flag.

Allow directing of CSV to stdout

This could be made more general by Reporters taking an io.Writer as an argument, and adding a -o flag to direct output to a file (where output defaults to stdout). This would allow any Reporter's output to be directed either to a file or to stdout.

Setup CI

Although there are no tests in the code base, we should be atleast checking that it compiles.

Introduce travis CI. Introduce a build and go test step.

Argument concept

Allow Depers to receive any command line flags. This will allow the behavior to be adjusted.
For example, the npm deper does not currently gather development dependencies, a flag could decide whether it should include them or not.

Improve handling of unknown files

When an unknown file is provided, instead of just outputting unknown file, include the filename of the provided file and explain why it is unknown. Something like Diligent does not know how to process 'Gopkg.toml' files.

Thanks @alcortesm

package regex whitelisting

Many companies have internal libraries which are not exposed to the internet and do not have associated licenses. Regex whitelisting on package identifier could be used to ignore libraries you don't want to check.

Thanks @rossmcf

Tabulated output

The output to stdout would be easier to read if it was tabulated.

Current output is:

github.com/inconshreveable/mousetrap -> Apache License 2.0
github.com/pelletier/go-toml -> MIT License
github.com/ryanuber/go-license -> MIT License
github.com/spf13/cobra -> Apache License 2.0
github.com/spf13/pflag -> BSD-3-Clause

Proposed output:

github.com/inconshreveable/mousetrap	Apache License 2.0
github.com/pelletier/go-toml		MIT License
github.com/ryanuber/go-license		MIT License
github.com/spf13/cobra			Apache License 2.0
github.com/spf13/pflag			BSD-3-Clause

Basic CI Output

For running on a build server we need an output mode which returns a non zero result if a license is found which is not compatible with the product/software.

Initially the user should be able to specify a whitelist of allowed license identifiers. In future this can be improved.

Handle unset GOPATH

When no GOPATH is set, obtaining the license from the package's files fails.

Split functionality into two commands

Introduce a list command and a validate command. This helps it cover two use cases without confusion and clearly says what it is going to do.

I would have split the functionality of listing licenses and checking them in two commands: a list command that only list the subprojects and their licenses and a whitelist command that only reports if the subprojects comply with the whitelist or not, that returns a single line ("pass" or "fail", in addition to the exit value).

Thanks @alcortesm

404 for NPM scoped packages

diligent doesn't work with NPM scoped packages (eg. @angular/cli).

This is because 44419b8 changed the NPM registry URL from https://registry.npmjs.org/{package}/{version} to https://registry.npmjs.org/{package}?version={version}, which for some weird reason doesn't support scoped packages, even if the slash (/) is URL encoded as %2F.

I've sent an email to NPM support about this behavior, but its unlikely that they will address it anytime soon.

To revert back to using https://registry.npmjs.org/{package}/{version}, we need to strip any symbols before the version, as https://registry.npmjs.org/{package}/{version} only supports exact versions, unlike https://registry.npmjs.org/{package}?version={version}.

Godoc

Document code. May also need some renaming.

Output concept

Introduce a concept of an output. This will allow users to select what form of output they would like. Current ideas, JSON, csv, html

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.