-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
cli(lighthouse): Add --mixed-content flag for triggering the mixed content audit #4441
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for putting up the PR!
lighthouse-core/index.js
Outdated
@@ -40,8 +40,8 @@ function lighthouse(url, flags = {}, configJSON) { | |||
log.setLevel(flags.logLevel); | |||
|
|||
// Use ConfigParser to generate a valid config file | |||
const config = new Config(configJSON, flags.configPath); | |||
|
|||
const config = flags.mixedContent ? new Config(require('./config/mixed-content.js'), null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about we handle this over in bin.js where we handle --perf
:)
lighthouse/lighthouse-cli/bin.js
Lines 57 to 59 in 3030b4f
} else if (cliFlags.perf) { | |
config = /** @type {!LH.Config} */ (perfOnlyConfig); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. That's a better place than the awkward ternary I came up with.
I think we also want to add "headless" into the chromeFlags in this case, yeah? |
Yep, missed that when converting it over to a flag (and didn't do enough testing). I'll push another commit adding that in. |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
I added some commits. @patrickhulce lgty? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm thanks @christhompson!
Per discussion on #4344, it may be simpler to add a flag to lighthouse itself for the mixed content scan configuration rather than trying to do it through yarn/npm (as the yarn/npm invocations get unwieldy very fast).
This is an initial attempt at adding a
--mixed-content
flag that loads the mixed-content.js config if passed (essentially simplifying passing a custom config path to an included configuration file).@paulirish WDYT?