Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions telemetry/definitions/commonDefinitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1041,14 +1041,14 @@
"type": "string",
"description": "Names of the pre-validation errors that can occur in the project",
"allowedValues": [
"No pom.xml file found",
"No Java project found",
"Mixed Java project and another language found",
"Project selected is not Java 8 or Java 11",
"Only Maven projects supported",
"Empty project",
"Non SSO login",
"Project running on backend"
"NoPom",
"NoJavaProject",
"MixedLanguages",
"UnsupportedJavaVersion",
"NonMavenProject",
"EmptyProject",
"NonSsoLogin",
"RemoteRunProject"
Comment on lines +1044 to +1051
Copy link

Choose a reason for hiding this comment

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

Do we map these values to a proper error message?

]
},
{
Expand Down
5 changes: 1 addition & 4 deletions telemetry/vscode/src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,7 @@ function getArgsFromMetadata(m: MetadataType): string {
name,
kind: StructureKind.TypeAlias,
isExported: true,
type: m.allowedValues.map(v => {
const modifiedVal = typeof v === "string" ? v.replace(/\s/g, "_") : v;
return `'${modifiedVal}'`
}).join(' | '),
type: m.allowedValues.map(v => `'${v}'`).join(' | '),
Copy link
Contributor

@justinmk3 justinmk3 Dec 11, 2023

Choose a reason for hiding this comment

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

Copy link

Choose a reason for hiding this comment

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

Is it possible that allowedValues is undefined?

})
}

Expand Down