Skip to content
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

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

CalemRoelofsSB
Copy link
Contributor

@CalemRoelofsSB CalemRoelofsSB commented Dec 20, 2023

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'

@CalemRoelofsSB
Copy link
Contributor Author

It's interesting that prettier sees these as useless escapes https://github.com/swagger-api/apidom/actions/runs/7274733595/job/19821257422?pr=3566

@char0n char0n self-assigned this Dec 20, 2023
@char0n char0n added ApiDOM bug Something isn't working labels Dec 20, 2023
Copy link
Member

@char0n char0n left a 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.

@CalemRoelofsSB
Copy link
Contributor Author

@char0n ah perfect, sorry about that! I've added it in now.

Copy link
Member

@char0n char0n left a 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 CalemRoelofsSB merged commit 2a83fd6 into main Dec 20, 2023
8 checks passed
@CalemRoelofsSB CalemRoelofsSB deleted the issue-3565 branch December 20, 2023 14:47
@char0n
Copy link
Member

char0n commented Dec 20, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ApiDOM bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants