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 ability to toggle certain schema warnings off #1975

Closed
mateenkasim opened this issue Jul 5, 2024 · 0 comments · Fixed by #1984
Closed

Add ability to toggle certain schema warnings off #1975

mateenkasim opened this issue Jul 5, 2024 · 0 comments · Fixed by #1984
Assignees
Labels
kind/proposal Something fundamentally needs to change

Comments

@mateenkasim
Copy link

Problem Statement

This is a refiling of authzed/spicedb-vscode#12 but in the proper repo.

First of all, thanks for making the new VS Code extension and LSP! The coloring, hovers, and lint are awesome to have during schema development. 🎉

Onto the issue: My schema has something similar to this:

definition folder {
    relation editor: user
    permission create_child_folder = editor
    // ... etc
}

This produces this warning:
Permission "create_child_folder" references parent type "folder" in its name; it is recommended to drop the suffix

I understand what this warning is getting at, but it's not exactly relevant in this case – the "child_folder" just happens to be the same resource as the parent "folder", hence the suffix. Since other warnings are still valuable, it would be great to selectively turn off this warning.

Generally, I'd like to toggle on/off whatever warnings are best for me. Perhaps a // zed-disable-warning: parent-name-in-suffix at the top of the file, or something in the .vscode/settings file?

Solution Brainstorm

From @josephschorr in the linked issue:

Should be easy to add something that uses the comment metadata on the nodes and disables it

@mateenkasim mateenkasim added the kind/proposal Something fundamentally needs to change label Jul 5, 2024
@josephschorr josephschorr self-assigned this Jul 11, 2024
josephschorr added a commit to josephschorr/spicedb that referenced this issue Jul 11, 2024
josephschorr added a commit to josephschorr/spicedb that referenced this issue Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/proposal Something fundamentally needs to change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants