Skip to content

Report TCGC diagnostics#3810

Open
JialinHuang803 wants to merge 4 commits intoAzure:mainfrom
JialinHuang803:report-tcgc-diagnostics
Open

Report TCGC diagnostics#3810
JialinHuang803 wants to merge 4 commits intoAzure:mainfrom
JialinHuang803:report-tcgc-diagnostics

Conversation

@JialinHuang803
Copy link
Member

Report error and warning diagnostics from dpgContext if any.

const dpgContext = await createContextWithDefaultOptions(context);

// Report any diagnostics from TCGC
if (dpgContext.diagnostics?.length > 0) {
Copy link
Member

Choose a reason for hiding this comment

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

could we have a small UT for this? for example with duplicated models, tcgc would report error to ensure the diagnostics are triggered.

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