-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add support for linting while typing #151
base: master
Are you sure you want to change the base?
Add support for linting while typing #151
Conversation
Added configuration option `lint-trigger` which defaults to save or type depending on the current version of ameba in use. This will also lint untitled files that aren't saved to disk.
Aside of my other comments, I'm wondering is this change really needed? |
Yes? This was the entire purpose of me creating this series of PRs (and adding stdin support to ameba), to allow for running the ameba linter while typing, which significantly improves the development experience. |
Co-authored-by: Sijawusz Pur Rahnama <[email protected]>
Co-authored-by: Sijawusz Pur Rahnama <[email protected]>
Co-authored-by: Sijawusz Pur Rahnama <[email protected]>
Co-authored-by: Sijawusz Pur Rahnama <[email protected]>
Co-authored-by: Sijawusz Pur Rahnama <[email protected]>
@nobodywasishere My bad, I was unclear (writing on mobile...), what I really meant to ask was: why switching to |
Ahh okay. In my opinion, having the enum is much clearer about what is happening. Having both an "on type" and "on save" setting may get confusing, especially since there's no way to support the case of "on save" being false and "on type" being true. |
I've checked other, similar-type-of extensions and they're doing the same thing (enum), so it seems that's just the way the cookie crumbles. |
There are some errors that needs fixing, otherwise seems GTG. |
Co-authored-by: Sijawusz Pur Rahnama <[email protected]>
842dfac
to
f1158b9
Compare
Co-authored-by: Sijawusz Pur Rahnama <[email protected]>
crystal-ameba.lint-trigger
:none
: linting will always be triggered automatically by commandssave
: linting is only triggered when savingtype
: linting is run for the current file every time there's a changetype
unless ameba is < 1.6.4Resolves #89