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

feat: add JSON compatibility for forge test --summary +/ --detailed + apply consistent table styling #9485

Merged
merged 11 commits into from
Dec 5, 2024

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Dec 4, 2024

Motivation

Improves JSON compatibility for forge test, improve consistency of table rendering

Solution

Screenshot from 2024-12-04 18-35-39

  • Adds JSON compatibility for --summary and --summary + --detailed
  • Apply consistent table styling everywhere, improve layout for readability, ensure an empty line before and after the table
  • Clarify SummaryReporter to be CoverageSummaryReporter
  • Update snapshot reports

@zerosnacks zerosnacks changed the title feat: add JSON compatibility for --summary and --detailed + apply consistent table styling feat: add JSON compatibility for forge test --summary +/ --detailed + apply consistent table styling Dec 4, 2024
@zerosnacks zerosnacks self-assigned this Dec 4, 2024
@zerosnacks zerosnacks marked this pull request as ready for review December 4, 2024 17:33
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

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

lgtm, consistent summaries looks great!

@zerosnacks zerosnacks merged commit a4de7e8 into master Dec 5, 2024
21 checks passed
@zerosnacks zerosnacks deleted the zerosnacks/fix-summary-detailed-json branch December 5, 2024 08:34
MaxMustermann2 added a commit to MaxMustermann2/exocore-contracts that referenced this pull request Dec 6, 2024
github-merge-queue bot pushed a commit to ExocoreNetwork/exocore-contracts that referenced this pull request Dec 10, 2024
* fix(generate): update for chain addition

* fix: use nativeChain to compare

* fix(ci): use `forge inspect --json`

See foundry-rs/foundry#9485
@adamegyed
Copy link

Hey all, previously the table formatting was markdown, and we could pipe it directly into .md files in automated CI actions. However, now the format requires some non-trivial parsing to turn into a MD table (more that what seems feasible with sed and grep). Would it be possible to configure the table formatting to not always use the UTF8_ROUND_CORNERS option from this PR?

@zerosnacks
Copy link
Member Author

Hi @adamegyed

We recently added broad support for JSON serialization of the output rendered to the console using the global --json flag. You are recommended to use this instead. If there are cases where you are running into issues please open a ticket - some are known but it helps us prioritize. What is rendered to the terminal is optimized for human readability.

@grandizzy grandizzy added T-feature Type: feature C-forge Command: forge labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge T-feature Type: feature
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3 participants