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

Adopt accessing configuration API correctly #37041

Closed
3 tasks done
sandy081 opened this issue Oct 27, 2017 · 2 comments
Closed
3 tasks done

Adopt accessing configuration API correctly #37041

sandy081 opened this issue Oct 27, 2017 · 2 comments
Labels
bug Issue identified by VS Code Team member as probable bug config VS Code configuration, set up issues verified Verification succeeded
Milestone

Comments

@sandy081
Copy link
Member

sandy081 commented Oct 27, 2017

In #36623 - I warn those accessing configuration API to get a value for resource configuration without passing a resource or to get a value for window configuration by passing resource.

Error prone:

  • If you are accessing the value for resource configuration of a resource, you should be passing the resource.

Good practice:

  • If you are accessing the value for resource configuration of any resource, pass null
  • If you are accessing the value for window configuration, do not pass resource.
  • If you want to access different values, use inspect.

Main intention behind this is to give run-time warnings and help extension authors when they are accessing the API wrongly by mistake.

After enabling this, I see following warnings from our in built extensions those accessing resource configurations without passing a resource.

  • vscode.git is accessing files.encoding configuration
  • vscode.typescript is accessing typescript and javascript configurations
  • vscode.json is accessing json.scripts configuration

Owners of above extensions, go through the usages of configuration access API or go through the warnings generated in VS Code run from OOS and fix/adopt to above practises.

@joaomoreno joaomoreno added this to the October 2017 milestone Oct 27, 2017
@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug config VS Code configuration, set up issues labels Oct 27, 2017
@joaomoreno joaomoreno removed their assignment Oct 27, 2017
joaomoreno added a commit that referenced this issue Oct 27, 2017
@mjbvz mjbvz removed their assignment Oct 27, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Oct 27, 2017

Should be done for typescript and markdown. Let me know if you see any further issues for these extensions

@sandy081
Copy link
Member Author

Adopted on behalf of @aescli.

egamma pushed a commit that referenced this issue Oct 31, 2017
egamma pushed a commit that referenced this issue Oct 31, 2017
@sandy081 sandy081 added the verified Verification succeeded label Nov 1, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug config VS Code configuration, set up issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants