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

cli(lighthouse): Add --mixed-content flag for triggering the mixed content audit #4441

Merged
merged 7 commits into from
Feb 8, 2018

Conversation

christhompson
Copy link
Contributor

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?

Copy link
Collaborator

@patrickhulce patrickhulce left a 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!

@@ -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)
Copy link
Collaborator

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 :)

} else if (cliFlags.perf) {
config = /** @type {!LH.Config} */ (perfOnlyConfig);
}

Copy link
Contributor Author

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.

@paulirish
Copy link
Member

I think we also want to add "headless" into the chromeFlags in this case, yeah?

@christhompson
Copy link
Contributor Author

Yep, missed that when converting it over to a flag (and didn't do enough testing). I'll push another commit adding that in.

@googlebot
Copy link

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 cla/google commit status will not change from this State. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@paulirish
Copy link
Member

I added some commits. @patrickhulce lgty?

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks @christhompson!

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

Successfully merging this pull request may close these issues.

None yet

5 participants