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

Fix: Using formatter-stylish in CI by default. #2893

Merged
merged 2 commits into from
Sep 6, 2019

Conversation

sarvaje
Copy link
Contributor

@sarvaje sarvaje commented Aug 30, 2019

Fix #2892

Pull request checklist

Make sure you:

For non-trivial changes, please make sure you also:

  • Added/Updated related documentation.
  • Added/Updated related tests.

Short description of the change(s)

Copy link
Member

@antross antross left a comment

Choose a reason for hiding this comment

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

@molant Want to take a look?

My only concern is more general than specific to this change so I won't block on it. As we keep adding more special-case handling to our default configuration I think we should start considering how we can do this in a way that's easier to extend.

Today once someone adds their own .hintrc file they lose the benefits of this conditional logic. E.g. if someone extends web-recommended then output in CI will look different than before and they won't be able to analyze file system paths. They can certainly replicate these behaviors by passing different config files to hint themselves depending on the context, but the sudden change in functionality may be surprising.

@molant
Copy link
Member

molant commented Sep 4, 2019

@antross can you please open an issue to discuss that? Probably part of the next version discussion we should have.

Copy link
Member

@molant molant left a comment

Choose a reason for hiding this comment

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

What do you think about checking that stylish is not used if not in CI in one of the existing tests?

@antross
Copy link
Member

antross commented Sep 6, 2019

@sarvaje want to add the test case @molant suggested so we can unblock and merge this PR?

@sarvaje
Copy link
Contributor Author

sarvaje commented Sep 6, 2019

ok

@sarvaje
Copy link
Contributor Author

sarvaje commented Sep 6, 2019

@antross
Copy link
Member

antross commented Sep 6, 2019

@sarvaje maybe I'm missing something, but I don't see a test that validates it only uses html and summary when NOT in CI...

@sarvaje
Copy link
Contributor Author

sarvaje commented Sep 6, 2019

not literally, but we are checking that the configuration is { extends: ["web-recommended"]} and {extends: ["development"]}

@molant
Copy link
Member

molant commented Sep 6, 2019

It's weird to me that we have a test to check the formatters in one environment and not another.

@sarvaje
Copy link
Contributor Author

sarvaje commented Sep 6, 2019

The test is there, if it is not CI, the configuration is { extends: ["web-recommended"]} if it is in CI, the configuration is {extends: ["web-recommended"], formatters: ["stylish", "html"]}

If we are not in CI, the property formatter is not initialized and we are using whatever comes from the extends.

@sarvaje
Copy link
Contributor Author

sarvaje commented Sep 6, 2019

I can't check the property formatter, because when I'm not in CI, I only use the extends. And I don't think we should test here what the extends has by default.

@molant
Copy link
Member

molant commented Sep 6, 2019

OK, then 👍

@antross antross merged commit efe2313 into webhintio:master Sep 6, 2019
@sarvaje sarvaje deleted the ci-formatter branch November 21, 2019 17:19
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.

[Feature] Improve logging in CI
3 participants