-
Notifications
You must be signed in to change notification settings - Fork 293
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
Update BaseSubjectSet to support caveat expressions #932
Merged
+6,171
−487
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,73 @@ | ||
--- | ||
run: | ||
timeout: "5m" | ||
timeout: '5m' | ||
output: | ||
sort-results: true | ||
linters-settings: | ||
goimports: | ||
local-prefixes: "github.com/authzed/spicedb" | ||
local-prefixes: 'github.com/authzed/spicedb' | ||
rowserrcheck: | ||
packages: | ||
- "github.com/jmoiron/sqlx" | ||
- "github.com/jackc/pgx" | ||
- 'github.com/jmoiron/sqlx' | ||
- 'github.com/jackc/pgx' | ||
gosec: | ||
excludes: | ||
- "G404" # Allow the usage of math/rand | ||
- 'G404' # Allow the usage of math/rand | ||
linters: | ||
enable: | ||
- "bidichk" | ||
- "bodyclose" | ||
- "deadcode" | ||
- "errcheck" | ||
- "errname" | ||
- "errorlint" | ||
- "gofumpt" | ||
- "goimports" | ||
- "goprintffuncname" | ||
- "gosec" | ||
- "gosimple" | ||
- "govet" | ||
- "importas" | ||
- "ineffassign" | ||
- "makezero" | ||
- "prealloc" | ||
- "predeclared" | ||
- "promlinter" | ||
- "revive" | ||
- "rowserrcheck" | ||
- "staticcheck" | ||
- "structcheck" | ||
- "stylecheck" | ||
- "tenv" | ||
- "typecheck" | ||
- "unconvert" | ||
- "unused" | ||
- "varcheck" | ||
- "wastedassign" | ||
- "whitespace" | ||
- 'bidichk' | ||
- 'bodyclose' | ||
- 'deadcode' | ||
- 'errcheck' | ||
- 'errname' | ||
- 'errorlint' | ||
- 'gofumpt' | ||
- 'goimports' | ||
- 'goprintffuncname' | ||
- 'gosec' | ||
- 'gosimple' | ||
- 'govet' | ||
- 'importas' | ||
- 'ineffassign' | ||
- 'makezero' | ||
- 'prealloc' | ||
- 'predeclared' | ||
- 'promlinter' | ||
- 'revive' | ||
- 'rowserrcheck' | ||
- 'staticcheck' | ||
- 'structcheck' | ||
- 'stylecheck' | ||
- 'tenv' | ||
- 'typecheck' | ||
- 'unconvert' | ||
- 'unused' | ||
- 'varcheck' | ||
- 'wastedassign' | ||
- 'whitespace' | ||
issues: | ||
exclude-rules: | ||
- text: "tx.Rollback()" | ||
- text: 'tx.Rollback()' | ||
linters: | ||
- "errcheck" | ||
- 'errcheck' | ||
# NOTE: temporarily disable deprecation checks for v0. | ||
- path: "internal/services/" | ||
- path: 'internal/services/' | ||
linters: | ||
- "staticcheck" | ||
text: "SA1019" | ||
- path: "internal/middleware/consistency/" | ||
- 'staticcheck' | ||
text: 'SA1019' | ||
- path: 'internal/middleware/consistency/' | ||
linters: | ||
- "staticcheck" | ||
text: "SA1019" | ||
- path: "pkg/proto/core/v1/core.pb.validate.manual.go" # Ignore manual definition of metadata map | ||
- 'staticcheck' | ||
text: 'SA1019' | ||
- path: 'pkg/proto/core/v1/core.pb.validate.manual.go' # Ignore manual definition of metadata map | ||
linters: | ||
- "stylecheck" | ||
text: "ST1003" | ||
- path: "pkg/proto/core/v1/core.pb.validate.manual.go" # Ignore manual definition of metadata map | ||
- 'stylecheck' | ||
text: 'ST1003' | ||
- path: 'pkg/proto/core/v1/core.pb.validate.manual.go' # Ignore manual definition of metadata map | ||
linters: | ||
- "revive" | ||
text: "var-naming" | ||
- 'revive' | ||
text: 'var-naming' | ||
# Ignore receiver errors for generic types not understood by the linter. | ||
- linters: | ||
- 'revive' | ||
text: 'receiver-naming: receiver name \S+ should be consistent with previous receiver name \S+ for invalid-type' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
#!/usr/bin/env -S buf generate -o pkg/proto proto/internal --template | ||
--- | ||
version: "v1" | ||
version: 'v1' | ||
managed: | ||
enabled: true | ||
go_package_prefix: | ||
default: "github.com/authzed/spicedb/pkg/proto" | ||
default: 'github.com/authzed/spicedb/pkg/proto' | ||
except: | ||
- "buf.build/envoyproxy/protoc-gen-validate" | ||
- "buf.build/authzed/api" | ||
- "buf.build/googleapis/googleapis" | ||
- 'buf.build/envoyproxy/protoc-gen-validate' | ||
- 'buf.build/authzed/api' | ||
- 'buf.build/googleapis/googleapis' | ||
plugins: | ||
- name: "go" | ||
out: "." | ||
opt: "paths=source_relative" | ||
- name: "go-grpc" | ||
out: "." | ||
opt: "paths=source_relative" | ||
- name: "go-vtproto" | ||
out: "." | ||
- name: 'go' | ||
out: '.' | ||
opt: 'paths=source_relative' | ||
- name: 'go-grpc' | ||
out: '.' | ||
opt: 'paths=source_relative' | ||
- name: 'go-vtproto' | ||
out: '.' | ||
# To generate pooling methods, you must add an additional `pool=fully/qualified.ProtoMessageType` | ||
opt: "paths=source_relative,features=marshal+unmarshal+size+clone+pool" | ||
- name: "validate" | ||
out: "." | ||
opt: "paths=source_relative,lang=go" | ||
opt: 'paths=source_relative,features=marshal+unmarshal+size+clone+pool+equal' | ||
- name: 'validate' | ||
out: '.' | ||
opt: 'paths=source_relative,lang=go' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't panic-ing here prevent us from cutting an release without the debug tooling implemented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! That's intended; I want to do something here, even if it is just returning "(unsupported)", but I don't know exactly what yet, so I added in panics