2024-02-14 17:27:03 +00:00
|
|
|
id: validate-requires-code
|
2024-04-26 20:43:17 +00:00
|
|
|
message: Validations requires code / message being set for frontend error display
|
2024-02-14 17:27:03 +00:00
|
|
|
severity: error
|
|
|
|
language: rust
|
|
|
|
files:
|
2024-04-26 20:43:17 +00:00
|
|
|
- ./ee/tabby-webserver/src/**
|
2024-05-02 05:50:26 +00:00
|
|
|
- ./ee/tabby-schema/src/**
|
2024-02-14 17:27:03 +00:00
|
|
|
rule:
|
|
|
|
all:
|
2024-04-26 20:43:17 +00:00
|
|
|
- pattern: "#[validate]"
|
2024-02-14 17:27:03 +00:00
|
|
|
- not:
|
2024-04-26 20:43:17 +00:00
|
|
|
all:
|
|
|
|
- has:
|
|
|
|
stopBy: end
|
|
|
|
pattern: code
|
|
|
|
- has:
|
|
|
|
stopBy: end
|
|
|
|
pattern: message
|
2024-02-14 17:27:03 +00:00
|
|
|
- not:
|
2024-08-09 22:29:19 +00:00
|
|
|
any:
|
|
|
|
- has:
|
|
|
|
stopBy: end
|
|
|
|
pattern: custom
|
|
|
|
- has:
|
|
|
|
stopBy: end
|
|
|
|
pattern: nested
|
|
|
|
- has:
|
|
|
|
stopBy: end
|
|
|
|
pattern: schema
|