Skip to content

feat(tools-formatting): Support github and azure output formatting for annotations and groups#4153

Open
JasonVMo wants to merge 6 commits into
mainfrom
user/jasonvmo/output-grouping
Open

feat(tools-formatting): Support github and azure output formatting for annotations and groups#4153
JasonVMo wants to merge 6 commits into
mainfrom
user/jasonvmo/output-grouping

Conversation

@JasonVMo
Copy link
Copy Markdown
Collaborator

Description

This adds functionality in tools-formatting to support github actions and azure pipelines console output.

Reporters

It does this by introducing the concept of reporters, similar to many other tools (like testing frameworks), which controls how certain types of output is formatted.

  • four built-in reporter types are supported: azure, github, console, and file
  • console and file are identical for now, except that file disables color formatting
  • ReporterRegistry is a singleton class which can be overridden if additional reporter types need to be supported.
  • reporters handle annotations, file annotations, and groups
  • for console/file: annotations just provide standard error message formatting, groups utilize tree-views for output

Core functions

The library exposes formatMessage, formatFileMessage, and formatGroup which can have the reporter specified, or will default to whatever is appropriate for the current environment.

To-dos

  • Integrate the table formatting. This will involve handling writing MD tables to github summary files, and support for MD as a format in general.
  • Consume the library in tools that produce grouped output (like align-deps)

Comment thread incubator/tools-formatting/README.md Outdated
Comment thread incubator/tools-formatting/README.md Outdated
Comment thread incubator/tools-formatting/README.md Outdated
@Saadnajmi
Copy link
Copy Markdown
Contributor

Any chance this could be shared with Lage?

@JasonVMo
Copy link
Copy Markdown
Collaborator Author

Any chance this could be shared with Lage?

Yes, totally. This package is a zero-dependency formatting package that can be used anywhere for structured formatting.

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.

2 participants