GithubHelp home page GithubHelp logo

Using only the license checker about melpazoid HOT 6 CLOSED

akirak avatar akirak commented on July 19, 2024 1
Using only the license checker

from melpazoid.

Comments (6)

riscy avatar riscy commented on July 19, 2024 1

Neat, I'm excited to see those checks in Nix. They're sort of a hack (no syntax tree) but they seem to be useful.

Given what you write above, maybe it's time to split the license checker out into its own module that can be accessed through some CLI. Something like this?

python3 check_license.py </path/to/elisp/*.el> [--github-repo=optional]

from melpazoid.

akirak avatar akirak commented on July 19, 2024 1

maybe it's time to split the license checker out into its own module that can be accessed through some CLI.

Thanks, that's a good idea. Melpazoid looks like a complete suite for checking packages, but I don't have Docker on every machine, so I like to implement an alternative in Nix. Recently, Nix has got an elisp parser (written purely in the language), which makes it really a nice tool for Emacs developers. emacs-overlay is a hub for Nix + Emacs people.

Regarding use of the experimental checker from outside, I basically set noninteracrive to nil to disable other checks and and printed the contents of melpazoid-buffer to stdout. I transformed the output, but it's just a preference and not necessary. It's indeed a hack, but it was not hard at all.

from melpazoid.

riscy avatar riscy commented on July 19, 2024

This has been slow coming as I've been thinking about factoring stuff out, but I decided it'd be best to keep the file intact for now. I'm thinking of something like:

python3 melpazoid.py --license [target]

For your use case, were you thinking [target] would tend to be on the local file system, or a repository somewhere?

from melpazoid.

akirak avatar akirak commented on July 19, 2024

@riscy Thanks, I'm going to run it in a local working tree. It has a feature to clone remote repositories, but it's basically run locally: Repositories are first cloned using Nix to a read-only file system, and then copied to (actually symlinked) writable sandboxes. Only files specified in recipes are copied to sandboxes, so I'll probably run the license checker in the read-only Nix store before copying. It would be better if the license checker didn't involve any write operation, but there will be a workaround anyways.

Since I use niv to freeze dependencies in my Nix projects, your changes won't affect my project until I update the dependency. Please feel free to reorganise your project to your liking.

from melpazoid.

riscy avatar riscy commented on July 19, 2024

This is on master now.

from melpazoid.

akirak avatar akirak commented on July 19, 2024

Thank you for this work. It detected a license in my project, and its API is good to me. I also noticed some changes in the experimental checks, so I will update my project soon.

from melpazoid.

Related Issues (20)

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.