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

Make it easier to run a specific audit category from CLI #4478

Closed
rviscomi opened this issue Feb 8, 2018 · 5 comments · Fixed by #4849
Closed

Make it easier to run a specific audit category from CLI #4478

rviscomi opened this issue Feb 8, 2018 · 5 comments · Fixed by #4849

Comments

@rviscomi
Copy link
Member

rviscomi commented Feb 8, 2018

My use case is to run only the SEO audits from the LH CLI. Disabling non-SEO audits would help speed up the test. Additionally, disabling irrelevant things like network throttling could help with audit performance.

Strawman proposal: --audit_categories=seo, --audit_categories=seo,perf

cc @kdzwinel

@patrickhulce
Copy link
Collaborator

patrickhulce commented Feb 8, 2018

love it, this would be fixed by the broader effort to unify the config and CLI settings which I've got a branch in progress to do :) it would look like

--only-categories=seo --only-categories=performance --only-audits=works-offline which would be equivalent of

{
  extends: 'lighthouse:default',
  settings: {
    onlyCategories: ['seo', 'performance'],
    onlyAudits: ['works-offline'],
  }
} 

@rviscomi
Copy link
Member Author

rviscomi commented Mar 8, 2018

@patrickhulce just checking, what's the status of your "broader effort"? Is this issue obsolete yet?

@patrickhulce
Copy link
Collaborator

Not obsolete yet, making progress in that direction with #4676 and some stuff we plan in #4333 :)

@ubbe-xyz
Copy link

Hi 👋🏻

I was trying the flag only-categories in your CLI, and I noticed the following format doesn't work:

ligthouse http://google.com --only-categories=performance,pwa,best-practices

but instead, it seems you support a much more tedious one:

ligthouse http://google.com --only-categories=performance --only-categories=pwa --only-categories=best-practices

Is there any scope/interest to change this? I would be happy to help with the change 🙋🏻‍♂️ 👨🏻‍💻 😊

@patrickhulce
Copy link
Collaborator

@lluia This is a built-in feature of yargs that does the repeated categories that way. How about you file an issue with the feature request for discussion, but I think we'd love your help :)

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

Successfully merging a pull request may close this issue.

4 participants