Closed vanya909 closed 8 months ago
confirmed.. the vs code extension does not resolve an ignore file.
The cli works as expected.
rules:
rule/path-must-not-be-thing:
severity: error
message: Path must not be "thing"
subject:
type: Paths
assertions:
pattern: '/^\/thing/'
openapi: 3.0.3
info:
title: blah
version: 1.0.0
paths:
/v1/thing:
get:
summary: a summary
description: a description
responses:
"200":
description: OK
content:
application/json:
schema: {}
# lint-ignore
./rule-error.yml:
rule/path-must-not-be-thing:
- '#/paths/~1v1~1thing'
$ redocly lint --config redocly.yaml ~/downloads/rule-error.yml --format stylish
validating C:/Users/fieljere/downloads/rule-error.yml...
C:/Users/fieljere/downloads/rule-error.yml: validated in 10ms
Woohoo! Your API description is valid. 🎉
1 problem is explicitly ignored.
Maybe the VS Code extension needs to set the config of the ignore file...
@tatomyr ?
I also hit this issue when using the extension.
@adamaltman the extension resolves config correctly (including the ignore file), but the linter isn't taking it into account for some reason. Might be some kind of pointers mismatch due to different environments.
@tatomyr @adamaltman here is the fix: https://github.com/Redocly/openapi-vs-code/pull/209
cc @lornajane
Thanks @RomanHotsiy! Will include this into today's release.
Actions:
Add some endpoint to
.redocly.lint-ignore.yaml
fileExpected behavior
Warning for this endpoint is disappeared in VSCode GUI
Actual behavior
Warning for this endpoint is still presented in VSCode GUI but it has disappeared in CLI (i.e. when I run
redocly lint
command)