File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,11 +167,22 @@ suite('Extension Test Suite', () => {
167167 const document = await openFixture ( 'test-schema.json' ) ;
168168 await vscode . commands . executeCommand ( 'sourcemeta-studio.openPanel' ) ;
169169 const diagnostics = await waitForDiagnostics ( document . uri , LINT_SOURCE ) ;
170- const ruleIds = diagnostics . map ( d => d . code . value ) ;
170+ const ruleIds = diagnostics . map ( d => d . code ) ;
171171 assert . ok ( ruleIds . includes ( 'top_level_description' ) ) ;
172172 assert . ok ( ruleIds . includes ( 'top_level_examples' ) ) ;
173173 } ) ;
174174
175+ test ( 'Should not provide a URL target for lint diagnostic codes' , async function ( ) {
176+ this . timeout ( 15000 ) ;
177+ await activateExtension ( ) ;
178+ const document = await openFixture ( 'test-schema.json' ) ;
179+ await vscode . commands . executeCommand ( 'sourcemeta-studio.openPanel' ) ;
180+ const diagnostics = await waitForDiagnostics ( document . uri , LINT_SOURCE ) ;
181+ for ( const diagnostic of diagnostics ) {
182+ assert . strictEqual ( typeof diagnostic . code , 'string' ) ;
183+ }
184+ } ) ;
185+
175186 test ( 'Should include related information in lint diagnostics' , async function ( ) {
176187 this . timeout ( 15000 ) ;
177188 await activateExtension ( ) ;
Original file line number Diff line number Diff line change @@ -232,12 +232,8 @@ function updateLintDiagnostics(documentUri, errors) {
232232
233233 diagnostic . source = 'Sourcemeta Studio (Lint)' ;
234234
235- if ( error . id ) {
236- diagnostic . code = {
237- value : error . id ,
238- target : vscode . Uri . parse ( `https://github.com/Karan-Palan/json-schema-lint-rules/tree/main/docs/${ error . id } .md` )
239- } ;
240- }
235+ // TODO: Provide a documentation URL target when we have per-rule docs
236+ diagnostic . code = error . id ;
241237
242238 diagnostic . relatedInformation = buildRelatedInfo (
243239 new vscode . Location ( documentUri , range ) , [
You can’t perform that action at this time.
0 commit comments