Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some options will not work in programming mode #42

Closed
YaminoYuki opened this issue Jun 23, 2022 · 4 comments
Closed

Some options will not work in programming mode #42

YaminoYuki opened this issue Jun 23, 2022 · 4 comments

Comments

@YaminoYuki
Copy link

Programmatically:
In the InitOpts we have:
/** * Output a summary of the license usage */ summary?: boolean | undefined;
also
/** * Write the data to a specific file. */ out?: string | undefined;

but when I call:
checker.init({ start: "path to start", summary : true, out: "filepath", .....

it seems to ignore both summary and out while for start it is working fine

@sportsracer
Copy link

@RSeidelsohn I am looking for a good first issue on this project (which I recently used, and now want to give back to). Would you say this is a good one?

I might try to move some of the business logic in bin/license-checker-rseidelsohn under the lib/ directory, and document it. As opposed to making a breaking change where licenseChecker.init suddenly reacts to out and summary args.

@RSeidelsohn
Copy link
Owner

Hi @sportsracer,

sorry, I just saw your message right now. Today is the first "every 2nd friday" where I am allowed to an will work on this OS project, so I'm currently going through some of the issues.
It is absolutely awesome that you want to participate in the development (no worries if you don't, but if you will, this is always more than welcome). This project's code is still a pretty mess and cleaning it up will take way more time than I initially thought it would. But now I can at least say that I have a relatively good understanding of what the code does how and where (still not perfect, though).
I have to have a look at this issue first, as I think that I already fixed it, as there was a duplicate of this issue, but I am not 100% sure.
Otherwise, anything you want to do is nice. I just want you to understand that the source code is still not easy to read and understand. Especially the tests could need some maintenance, and I would love to switch to using Jest, as I have experience with Jest but none with jenkins-mocha and istanbul.
So feel free to work on anything you want - breaking the code into smaller chunks (while not breaking the tests) is always very welcome!

Cheers, Roman.

@RSeidelsohn
Copy link
Owner

Dear @YaminoYuki,

I am sorry for the long delay! Could you possibly test this again and tell me if you still face this issue? I tried all the three options you mention in combination and the result was as expected the summary in the path and filename provided by the --out option.

Cheers, Roman.

@sportsracer
Copy link

Hi @RSeidelsohn

It's great that your company has that policy!

For me, the reported problem was still there on master. The --out parameter works correctly from the CLI, but not if you pass it like init({out: "path", ...}).

I've attempted a fix in #81 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants