@@ -88,11 +88,28 @@ have the following interface:
88
88
* Accept the input JSON data on stdin.
89
89
* Accept the jmespath expression as an argument.
90
90
* Print the jmespath result as JSON on stdout.
91
- * If an error occurred, it must write the error name to sys.stderr. The error
92
- name must be the first thing written to stderr, but it is free to write
93
- information after the error name. For example "syntax: Expression did not
94
- compile 'foo.bar.'" would be a valid message to indicate that a syntax error
95
- occurred because it starts with "syntax".
91
+ * If an error occurred, it must write the error name to sys.stderr. This
92
+ check is case insensitive.
93
+ The error types in the compliance tests are hyphenated, but each
94
+ individual component may appear in stderr (again case insensitive).
95
+
96
+ Here are a few examples of error messages that would pass ``jp-compliance ``:
97
+
98
+ * Error type: ``unknown-function ``
99
+ * Valid error messages:
100
+
101
+ * ``unknown-function: somefunction() ``
102
+ * ``error: unknown function 'somefunction() ``
103
+ * ``Unknown function: somefunction() ``
104
+
105
+ * Error type: ``syntax ``
106
+ * Valid error messages:
107
+
108
+ * ``syntax: Unknown token '$' ``
109
+ * ``syntax-error: Unknown token '$' ``
110
+ * ``Syntax error: Unknown token '$' ``
111
+ * ``An error occurred: Syntax error, unknown token '$' ``
112
+
96
113
97
114
.. note ::
98
115
0 commit comments