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(fish): allow an arbitrary word before line number #713

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

metiulekm
Copy link
Contributor

The error message generated by fish --no-execute varies by locale. For instance:

$ cat test.fish
|
$ LANG=C fish --no-execute test.fish
test.fish (line 1): Expected a string, but found a pipe
|
^
warning: Error while reading file test.fish

$ LANG=pl_PL.UTF-8 fish --no-execute test.fish
test.fish (linia 1): Expected a string, but found a pipe
|
^
warning: Wystąpił błąd podczas odczytywania pliku test.fish

This means that hardcoding the word line into the errorformat is too strong. This commit replaces it with an arbitrary string not containing a space character (%[%^ ]%#).

Fixes #708.

The error message generated by `fish --no-execute` varies by locale. For
instance:

```sh
$ cat test.fish
|
$ LANG=C fish --no-execute test.fish
test.fish (line 1): Expected a string, but found a pipe
|
^
warning: Error while reading file test.fish

$ LANG=pl_PL.UTF-8 fish --no-execute test.fish
test.fish (linia 1): Expected a string, but found a pipe
|
^
warning: Wystąpił błąd podczas odczytywania pliku test.fish

```

This means that hardcoding the word `line` into the errorformat is too
strong. This commit replaces it with an arbitrary string not containing
a space character (`%[%^ ]%#`).

Fixes mfussenegger#708.
@mfussenegger mfussenegger merged commit 02ea15a into mfussenegger:master Jan 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fish linter does not work on some non-English locales
2 participants