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

Minimal code example (for scanning a ZIP) #1550

Closed
matatk opened this issue Sep 19, 2017 · 4 comments
Closed

Minimal code example (for scanning a ZIP) #1550

matatk opened this issue Sep 19, 2017 · 4 comments

Comments

@matatk
Copy link

matatk commented Sep 19, 2017

I'm calling addons-linter from JS code to lint built extension ZIP files.

I found the example code a bit confusing; it seemed to imply that I needed to set config._ to the current directory, and config.scanFiles to an array containing the name of the extension's ZIP file. Eventually, I realised that the minimal config I needed to scan a ZIP file is more like:

config: {
	_: ['extension.zip'],
	logLevel: process.env.VERBOSE ? 'debug' : 'fatal'
}

Could something like this be added to the README? (I'd be happy to submit a PR if you agree.)

Additionally, would it be possible to rename config._ to config.extensionFile, config.source or similar?

Thanks for this helpful tool :-).

@EnTeQuAk
Copy link
Contributor

I'm not too familiar with yargs which is imho where this config._ is actually coming from. As far as I know this is simply the first positional command line argument that isn't specifically named.

If you find an alternative way to do that with yargs and name this appropriately we're very happy to accept a pull request!

@matatk
Copy link
Author

matatk commented Sep 22, 2017

I've been reading through yargs' docs and GitHub issues and I agree there doesn't seem to be a straightforward way to do this, but I have asked about it, and if a straightforward way is found, I'll submit a PR.

@EnTeQuAk
Copy link
Contributor

Cool, thanks for asking around! Feel free to keep us in the loop if something good comes up that we can use instead of that ambiguous _

@stale
Copy link

stale bot commented Oct 21, 2020

This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.

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

No branches or pull requests

3 participants