Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config option to disable automatically updating yaml.schemas with systems file:/// #25

Open
sbriceland opened this issue Sep 4, 2024 · 0 comments

Comments

@sbriceland
Copy link

From ArtilleryScriptManager:

    this.context.subscriptions.push(
      this.analyzer.onDidDetectScript(async (document) => {
        /**
         * @note Provide the full document URI so we apply the schema
         * both to local and to remote files.
         */
        this.scriptPaths.add(document.uri.toString())
        await this.writeConfigPaths()
      }),
      vscode.workspace.onDidDeleteFiles(async (event) => {
        for (const fileUri of event.files) {
          this.scriptPaths.delete(fileUri.toString())
        }

        await this.writeConfigPaths()
      }),
    )

It appears the onDidDetectScript listener automatically writes new config entries into the yaml.schemas list for each new test file detected. While this is convenient, it is problematic for teams that share settings.json.

Ideally there would be an config option like:

{
    "artillery.automaticScriptPaths": false
}

By disabling this, teams could still set artillery.include" & yaml.schemas manually, for example:

{
    "artillery.automaticScriptPaths": false,
    "artillery.include": ["load-tests/**/*.yml"],
    "yaml.schemas": {
        "https://www.artillery.io/schema.json": [
            "load-tests/**/*.yml"
        ]
    }
}
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

No branches or pull requests

1 participant