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

Test cat formatter and update usage string #710

Merged
merged 13 commits into from
Mar 13, 2023

Conversation

andregri
Copy link
Contributor

@andregri andregri commented Mar 4, 2023

@andregri andregri requested a review from a team as a code owner March 4, 2023 18:51
@martin-schulze-vireso
Copy link
Member

Thank for your suggestion. The cat formatter is intended as an internal debugging tool and as such not documented. Could you motivate why documentation and tests are warranted for this?

@andregri
Copy link
Contributor Author

andregri commented Mar 4, 2023

Since the cat formatter is supported by bats, it should be documented for developers or contributors. Maybe it would be better to improve the PR by adding a bit of documentation to specify that is used as an internal tool.

Even if it is an internal / debugging tool, I think that tests acts like documentation for contributors.

Eventually i added tests for completeness.

Copy link
Member

@martin-schulze-vireso martin-schulze-vireso left a comment

Choose a reason for hiding this comment

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

Following our previous discussion I reviewed the Code and have following suggestions:

  1. Documentatiin of this formatter should only be provided in the contributor guide
  2. AFAIK the only part of this formatter that is not already tested is that it prints the extended tap stream.

@andregri
Copy link
Contributor Author

andregri commented Mar 7, 2023

Documentation of this formatter should only be provided in the contributor guide

Should we document cat formatter in CONTRIBUTING.md, for instance under "Testing" section ? Or should we add cat option in USAGE.md?

AFAIK the only part of this formatter that is not already tested is that it prints the extended tap stream

To test the extended tap stream with the cat formatter I used the same input as the test "All formatters (except cat) implement the callback interface" in formatter.bats.

@martin-schulze-vireso
Copy link
Member

I'd put it into contributing.md

@andregri
Copy link
Contributor Author

I wrote few lines under the Testing section. Since it is a debugging tool, I think it may be useful to read about the cat formatter during testing.

@martin-schulze-vireso martin-schulze-vireso merged commit 4417a96 into bats-core:master Mar 13, 2023
@martin-schulze-vireso
Copy link
Member

Thanks for your contribution.

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

2 participants