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

SC2142 false positive with inline functions inside aliases #3159

Open
ssbarnea opened this issue Mar 14, 2025 · 0 comments
Open

SC2142 false positive with inline functions inside aliases #3159

ssbarnea opened this issue Mar 14, 2025 · 0 comments

Comments

@ssbarnea
Copy link
Contributor

We should not need to disable SC2142 in order to make use of inline functions, example:

# shellcheck disable=SC2142
alias mypy='f() { command mypy "${@:-.}"; }; f'

Code above adds . argument to mypy if is called without any arguments.

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