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

Complementary Linter / Static Analysis #478

Open
andychu opened this issue Sep 7, 2019 · 1 comment
Open

Complementary Linter / Static Analysis #478

andychu opened this issue Sep 7, 2019 · 1 comment

Comments

@andychu
Copy link
Contributor

andychu commented Sep 7, 2019

This bug is for brainstorming.

  • A script must pass bin/osh -O all:oil -n foo.sh first. That fixes some low hanging fruit.
  • shopt -s all:oil allows BOTH styles of conditionals now: do done / then else fi, or { }.
    • The translation tool can normalize them all to { }
  • pushd / popd -> cd with block
  • set -> builtin set or maybe shopt
  • warn about old-style assignments. Just assume no dynamic scope?
  • translate short opts to long opts
  • also see:
    • shopt -s no_old_builtins no_old_syntax. Some simple filters can be built into the interpreter?
    • it makes it more likely to stay clean over time ...
@andychu andychu changed the title Ideas for lint / translation tool Complementary Linter / Static Analysis May 25, 2022
@andychu
Copy link
Contributor Author

andychu commented May 25, 2022

Some of this came up recently

And again the autoformatter is very related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant