Open EPKLISN opened 1 year ago
If having numbers in message from a function, it will always put in a ":" between the two first numbers by default.
The function: module.exports = (targetVal) => { var str = "0 1 2 3 4 5"; return [{ message: ${str}}]; };
${str}
The rule: numbers: description: " " message: "{{error}}" given:
The result: 1:1 error numbers 0:1 2 3 4 5
Environment (remove any that are not applicable):
Expectation: The colon should not be shown.
Some clarification, it is between the "0" and "1" the colon should not appear.
The issue is most likely caused by https://github.com/stoplightio/spectral/blob/develop/packages/formatters/src/stylish.ts#L85.
If having numbers in message from a function, it will always put in a ":" between the two first numbers by default.
The function: module.exports = (targetVal) => { var str = "0 1 2 3 4 5"; return [{ message:
${str}
}]; };The rule: numbers: description: " " message: "{{error}}" given:
The result: 1:1 error numbers 0:1 2 3 4 5
Environment (remove any that are not applicable):
Expectation: The colon should not be shown.