Skip to content

Conversation

@Karan-Palan
Copy link
Collaborator

fixes #18

const config = vscode.workspace.getConfiguration('sourcemeta-studio');
if (config.get('disableBuiltInValidation', true)) {
vscode.workspace.getConfiguration('json').update('validate.enable', false, vscode.ConfigurationTarget.Workspace);
// Use Global config if no workspace is open, otherwise use Workspace
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added as tests fail when no workspace is opened

@augmentcode
Copy link

augmentcode bot commented Dec 22, 2025

🤖 Augment PR Summary

Summary: Adds a VS Code integration test to ensure Sourcemeta Studio disables VS Code’s built-in JSON validation (fixes #18).

Changes:

  • Introduced a new extension test that opens a schema fixture, opens the Sourcemeta Studio panel, and asserts no diagnostics originate from VS Code’s JSON language service.
  • Adjusted extension activation logic to disable JSON validation in the appropriate configuration scope depending on whether a workspace is open.

Technical Notes: The JSON validation toggle now targets Workspace when folders are present, otherwise Global to support empty-window scenarios (including tests).

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Signed-off-by: karan-palan <[email protected]>
}

const fixtureDir = path.join(__dirname, '..', '..', '..', 'test', 'vscode', 'fixtures');
const schemaPath = path.join(fixtureDir, 'invalid-metaschema.json');
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

uses a schema with metaschema errors that VS Code would catch if validation is enabled

@jviotti jviotti merged commit 8a337c4 into main Dec 23, 2025
4 checks passed
@jviotti jviotti deleted the 18 branch December 23, 2025 12:40
@jviotti
Copy link
Member

jviotti commented Dec 23, 2025

Awesome!

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.

Disable VS Code built-in schema autocompletion if possible

3 participants