-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patherrata.hcl
168 lines (161 loc) · 3.66 KB
/
errata.hcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
version = "0.1"
options {
prefix = "errata-"
base_url = "https://dannykopping.github.io/errata/errata/"
description = "Below is a set of errors that the `eish` program can return."
}
/*
File-related errata
*/
error "file-not-found" {
message = "File path is incorrect or inaccessible"
categories = ["file"]
guide = "Ensure the given file exists and can be accessed by errata"
args = [
arg("path", "string")
]
labels = {
severity = "fatal"
}
}
error "file-not-readable" {
message = "File is unreadable"
categories = ["file"]
guide = "Ensure the given file has the correct permissions"
args = [
arg("path", "string")
]
labels = {
severity = "fatal"
}
}
/*
Datasource-related errata
*/
error "invalid-definitions" {
message = "One or more definitions declared in are invalid"
categories = ["definitions", "validation"]
args = [
arg("path", "string")
]
labels = {
severity = "fatal"
}
}
error "invalid-syntax" {
message = "File has syntax errors"
categories = ["parsing"]
args = [
arg("path", "string")
]
labels = {
severity = "fatal"
}
}
error "invalid-datasource" {
message = "Datasource file is invalid"
categories = ["datasource"]
guide = "Check the given datasource file for errors"
args = [
arg("path", "string")
]
labels = {
severity = "fatal"
}
}
error "argument-label-name-clash" {
message = "An error definition contains a label with the same name as an argument"
categories = ["datasource", "validation"]
guide = "Error definitions must have labels with keys that are unique across the list of arguments"
args = [
arg("key", "string")
]
labels = {
severity = "fatal"
}
}
/*
Code-generation errata
*/
error "code-gen" {
message = "Code generation failed"
categories = ["codegen"]
guide = "The provided template may contain errors"
labels = {
severity = "fatal"
}
}
error "template-execution" {
message = "Error in template execution"
cause = "Possible use of missing or renamed field, or misspelled function"
categories = ["codegen"]
labels = {
severity = "fatal"
}
}
/*
Web-UI errata
*/
error "markdown-rendering" {
message = "Markdown rendering failed"
categories = ["web-ui"]
labels = {
severity = "warning"
}
}
error "serve-web-ui" {
message = "Cannot serve web UI for datasource %q"
args = [
arg("path", "string")
]
categories = ["serve", "web-ui"]
labels = {
severity = "fatal"
}
}
error "serve-unknown-route" {
message = "Requested route not defined"
args = [
arg("route", "string")
]
categories = ["serve", "web-ui"]
labels = {
severity = "warning"
}
}
error "serve-method-not-allowed" {
message = "Given HTTP method for requested route is not allowed"
args = [
arg("route", "string"),
arg("method", "string"),
]
categories = ["serve", "web-ui"]
labels = {
severity = "warning"
}
}
error "serve-unknown-code" {
message = "Cannot find error definition for given code %q"
args = [
arg("code", "string")
]
categories = ["serve", "web-ui"]
labels = {
severity = "warning"
http_status_code = "404",
}
}
error "serve-search-index" {
message = "Failed to build search index"
categories = ["serve", "web-ui", "search"]
labels = {
severity = "fatal"
}
}
error "serve-search-missing-term" {
message = "Search request is missing a \"term\" query string parameter"
categories = ["serve", "web-ui", "search"]
labels = {
severity = "warning"
}
}