KEMBAR78
Release v4.139.0 · hhvm/hhast · GitHub
Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

v4.139.0

Choose a tag to compare

@Atry Atry released this 10 Dec 23:19
· 95 commits to main since this release

This release fixes some minor issues in the HHClientLinter introduced by v4.135.0.

HHVM 4.126 and above remain supported.

About HHClientLinter

HHClientLinter is a special linter as a proxy to run linters written in OCaml via hh_client --lint, which could detect additional lint errors that are not covered by other HHAST linters. Now HHClientLinter is considered as publicly available, even though it's not enabled by default.

To enable HHClientLinter, put the following settings into your hhast-lint.json:

"extraLinters": [
  "Facebook\\HHAST\\HHClientLinter"
],

HHClientLinter can be configured to not report particular error codes by adding the following settings into your hhast-lint.json

"linterConfigs": {
  "Facebook\\HHAST\\HHClientLinter": {
    "ignore": [5624, 5639]
  }
}

or if you are interested in only particular error codes:

"linterConfigs": {
  "Facebook\\HHAST\\HHClientLinter": {
    "ignore_except": [5624, 5639]
  }
}

The definition of error codes can be found at lints_codes.ml.

The lint errors can be suppressed at the error code level with the help of HHAST_IGNORE_ERROR markers, for example:

/* HHAST_IGNORE_ERROR[5607] this lint error is a false positive */
$new = Vec\filter($this->_children, $c ==> $c !== $child);

HHAST_IGNORE_ALL is also supported for the whole file, but not encouraged:

// HHAST_IGNORE_ALL[5607] 5607 is ignored in the whole source file
// because of false positives when comparing a generic to a typed value

What's Changed

  • Use vec instead of keyset in HHClientLinter::TConfig by @Atry in #397
  • Limit the maximum number of hh_client processes to run in parallel by @Atry in #400
  • Dogfood HHClientLinter for hhast source code by @Atry in #398
  • Allow for unknown fields in the configuration of HHClientLinter by @Atry in #403
  • Reformat ProcessExecutionQueues using 2 spaces indentation by @Atry in #404
  • Fix lint errors emitted by HHClientLinter by @lexidor in #406
  • Remove HHClientLinter from NON_DEFAULT_LINTERS by @fredemmott in #411
  • Add Facebook\HHAST\HHClientLinter to extraLinters by @Atry in #413
  • Support file specific linter config by @Atry in #414
  • Mismatched configuration for a linter should fail the lint run (fix #405) by @Atry in #412
  • Don't ignore 5607 lint error under src/Migrations and fix an existing 5607 lint error by @Atry in #417
  • Ignore 5583 error code from hh_client --lint by @Atry in #419
  • Suppress lint errors file by file by @Atry in #418
  • By default ignore 5639 error code from hh_client --lint by @Atry in #422
  • Add a test to detect duplicated lint rules by @Atry in #427

Full Changelog: v4.135.1...v4.139.0