You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.
fixeshhvm#86
In order to make this change backwards compatible,
allowYesToAll() defaults to true.
Unsafe linters may override this to false.
I also considered a default of false,
but that would entail altering all safe linters (including third-party).
Unsafe linters may need to suppress `must use override` linter
if they wish to remain compatible with previous versions of hhast.
* Configure "yes to all" per linter
fixes#86
In order to make this change backwards compatible,
allowYesToAll() defaults to true.
Unsafe linters may override this to false.
I also considered a default of false,
but that would entail altering all safe linters (including third-party).
Unsafe linters may need to suppress `must use override` linter
if they wish to remain compatible with previous versions of hhast.
* Add allowYesToAll() to unsafe linters
Some linters look like they might be unsafe, but aren't on close inspection.
I added allowYesToAll(): bool { return true; } on those.
I checked every autofixing linter.
If I could not find a bad autofix, I left the linter untouched.
* Revert allowYesToAll to true
I changed this during testing and forgot to flip it back.
* Correct mistaken variable name in comment
The example first used `$a` as a meta syntactic variable.
I later changed to `$k` and `$v` for key and value.
I didn't update every use of `$_a`.
* Move allowYesToAll() down the type hierarchy
Suggested in a code review.
This only makes sense for autofixing linters.
* Rename allowYesToAll() to areBulkAutoFixesSafe()
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Some linters have unsafe autofixes, for example, the 'basic assignment' linter also detects accidental
invariant($foo = $bar, ...)
The text was updated successfully, but these errors were encountered: