-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ls): Fix regex in Swagger 2.0 basePath linting rule #3566
Conversation
b26f8fa
to
e4cd7ae
Compare
It's interesting that prettier sees these as useless escapes https://github.com/swagger-api/apidom/actions/runs/7274733595/job/19821257422?pr=3566 |
packages/apidom-ls/src/config/openapi/swagger/lint/base-path--pattern.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @CalemRoelofsSB, suggested the change that actually works.
By doing single \s
we're actually putting s
character there again. We need to do double slashing to actually create a \s
string: \\s
.
@char0n ah perfect, sorry about that! I've added it in now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! Thank you!
@CalemRoelofsSB please next time squash + merge your PR or let me do it. This PR created 3 commit messages in main branch and broke the linear history. |
Refs #3565
This PR fixes the regex in the
OPENAPI2_SWAGGER_FIELD_BASE_PATH_PATTERN
linting rule so that it matches on whitespace characters instead of the letter 's'