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

The check for multiple formatters using stdout is disabled when using profiles #826

Merged
merged 2 commits into from
Apr 14, 2015

Conversation

brasmusson
Copy link
Contributor

Somehow the check for multiple formatters using stdout is disabled when using profiles (even when the profile does not define any formatter). See failing scenario.

The root cause of this behaviour is the logic for replacing the stdout formatter form the profile with the stdout formatter from the command line options. Since the code remove all but the first stdout formatters, you can define several stdout formatters on the command line without getting an error when using profiles, but only the first one will actually be used. This behaviour cased some confusion in this mailing list thread.

To cover all cases, the check for multiple formatters needs to be performed multiple times:

  • for the profile options and command line options individually, to catch multiple stdout formatters either in a profile or on the command line
  • after merging the profile and command line options, to catch formatters from the profile and from the command line using the same file or directory for their output.

Since all formatters but the first that are using STDOUT are removed
when merging the profile options with the command line options, the
check needs to be performed multiple times to catch all conflicts.
@brasmusson brasmusson force-pushed the check-for-same-formatter-output branch from 9cb66f6 to 7b572e9 Compare April 13, 2015 19:19
@brasmusson
Copy link
Contributor Author

Now the check for multiple formatters using the same output stream/file/directory handle all cases.

@mattwynne
Copy link
Member

Looks good to me.

@brasmusson brasmusson merged commit 7b572e9 into master Apr 14, 2015
brasmusson added a commit that referenced this pull request Apr 14, 2015
@brasmusson brasmusson deleted the check-for-same-formatter-output branch April 14, 2015 19:43
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants