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

Confusing warning message for location blocks. #24

Open
snigel opened this issue Aug 25, 2022 · 0 comments
Open

Confusing warning message for location blocks. #24

snigel opened this issue Aug 25, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@snigel
Copy link

snigel commented Aug 25, 2022

When location regexes such as ~^ doesn't contain a space ie:

location ~*^/if-and-alias/

nginx accepts the configuration but the linter will show an incorrect error message:
"error Expected string when using 'location', got regular expression"

This message disappears as soon as the location is using a space.

location ~* ^/if-and-alias/

It would be nice if the linter suggested to add the space instead.

@snigel snigel changed the title Incorrect warning message for location blocks. Confusing warning message for location blocks. Aug 25, 2022
@jhinch jhinch added the enhancement New feature or request label Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants