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

New rule: suggest setting LC_ALL when calling sort #3101

Open
3 of 4 tasks
raphael-proust opened this issue Dec 12, 2024 · 0 comments
Open
3 of 4 tasks

New rule: suggest setting LC_ALL when calling sort #3101

raphael-proust opened this issue Dec 12, 2024 · 0 comments

Comments

@raphael-proust
Copy link

For bugs

  • Rule Id (if any, e.g. SC1000): None (yet?)
  • My shellcheck version (shellcheck --version or 'online'): online
  • I tried on shellcheck.net and verified that this is still a problem on the latest commit
  • It's not reproducible on shellcheck.net, but I think that's because it's an OS, configuration or encoding issue

For new checks and feature suggestions

Here's a snippet or screenshot that shows the problem:

#!/bin/sh
cat /tmp/some_file | sort

Here's what shellcheck currently says:

No issues detected!

Here's what I wanted or expected to see:

It should suggest to set LC_ALL=C locally in the script:

Did you mean
cat /tmp/some_file | LC_ALL=C sort

Setting LC_ALL ensures it's all sorted the same on all machines.

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

No branches or pull requests

1 participant