Implementing quickfix for Lint Code 5644 (Pointless booleans)
commitd5f26bd55ddea1c2bccc211e1587970e7925a722
authorEesha Shekhar <eeshashekhar@fb.com>
Tue, 16 Aug 2022 20:40:39 +0000 (16 13:40 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 16 Aug 2022 20:40:39 +0000 (16 13:40 -0700)
tree79ceb1cc460e3622f1a10e0b09f5e02e8ff931aa
parent7964e85dc2e24228fe937138fcc20769a7acec31
Implementing quickfix for Lint Code 5644 (Pointless booleans)

Summary:
Added a quickfix for Lint 5644. For example, if the user enters
```
$y = $x > 3 || true;
```
then a quickfix is provided which changes the statement to
```
$y = $x > 3;
```

Reviewed By: Wilfred

Differential Revision: D38744888

fbshipit-source-id: 215be57c3319baf9701ae4390b70c1f81b6ac4e9
hphp/hack/src/lints/linter_pointless_booleans.ml
hphp/hack/src/lints/lints_errors.ml
hphp/hack/src/utils/pos.mli
hphp/hack/test/json/run_json_on_file.php.exp
hphp/hack/test/json/test_quickfix_lint_code_5644.php [new file with mode: 0644]
hphp/hack/test/json/test_quickfix_lint_code_5644.php.exp [new file with mode: 0644]