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

Ide should expose linter rule documentation url in codefixes #3043

Closed
timotheeguerin opened this issue Mar 22, 2024 · 0 comments
Closed

Ide should expose linter rule documentation url in codefixes #3043

timotheeguerin opened this issue Mar 22, 2024 · 0 comments
Assignees
Labels
feature New feature or request ide Issues for VS, VSCode, Monaco, etc. triaged:core
Milestone

Comments

@timotheeguerin
Copy link
Member

timotheeguerin commented Mar 22, 2024

Eslint vscode extension has this SHow documentation popup

PR #4141 (comment) already added the link to the diagnostic but this could provide a more explicit option when clicking the code actions bulb

@markcowl markcowl added this to the Backlog milestone Mar 25, 2024
@timotheeguerin timotheeguerin added the ide Issues for VS, VSCode, Monaco, etc. label Aug 12, 2024
github-merge-queue bot pushed a commit that referenced this issue Aug 12, 2024
Saw that eslint extension was doing this. Part solution to
#3043 which could also
provide an explicit `Open documentation Url` command

<img width="568" alt="image"
src="https://github.com/user-attachments/assets/c3a322d2-17c7-45d9-962c-028c1e9cc93c">

For now all the API that gives that is limited to linter as other
diagnostic cannot define a url. Due to this limited usage I left the API
internal. The goal would be that any diagnostic can define a
documentation url and connect to this.
@RodgeFu RodgeFu added the feature New feature or request label Sep 10, 2024
sarangan12 pushed a commit to sarangan12/typespec that referenced this issue Sep 16, 2024
Saw that eslint extension was doing this. Part solution to
microsoft#3043 which could also
provide an explicit `Open documentation Url` command

<img width="568" alt="image"
src="https://github.com/user-attachments/assets/c3a322d2-17c7-45d9-962c-028c1e9cc93c">

For now all the API that gives that is limited to linter as other
diagnostic cannot define a url. Due to this limited usage I left the API
internal. The goal would be that any diagnostic can define a
documentation url and connect to this.
github-merge-queue bot pushed a commit that referenced this issue Dec 11, 2024
…5131)

Modifications

best-practices:
1、Add a URL to the rule file to point to the relevant document.(for
testing)

compiler:
1、A new codefix file has been added to handle the Linter Rule doc URL.
2、Added OPEN_RULE_DOC command type.
3、If the diagnostic URL is not empty, add a codefix and process the send
request in the server file.

typespec-vscode:
1、Define the request and open the received URL document.

samples:
1、Add lint-related configurations to the yaml configuration file to
define a lowercase model type in the tsp file for functional testing.
Such as "model foo {}".

Related issues:#3043

---------

Co-authored-by: Rodge Fu <[email protected]>
@RodgeFu RodgeFu closed this as completed Dec 12, 2024
archerzz pushed a commit to archerzz/typespec that referenced this issue Dec 17, 2024
…icrosoft#5131)

Modifications

best-practices:
1、Add a URL to the rule file to point to the relevant document.(for
testing)

compiler:
1、A new codefix file has been added to handle the Linter Rule doc URL.
2、Added OPEN_RULE_DOC command type.
3、If the diagnostic URL is not empty, add a codefix and process the send
request in the server file.

typespec-vscode:
1、Define the request and open the received URL document.

samples:
1、Add lint-related configurations to the yaml configuration file to
define a lowercase model type in the tsp file for functional testing.
Such as "model foo {}".

Related issues:microsoft#3043

---------

Co-authored-by: Rodge Fu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request ide Issues for VS, VSCode, Monaco, etc. triaged:core
Projects
None yet
Development

No branches or pull requests

4 participants