Skip to content

0.2.0

Compare
Choose a tag to compare
@JDGrimes JDGrimes released this 30 Mar 21:36
· 42 commits to master since this release

New:

  • HTML fragments like " class="something"/> and " alt="Img" /> are automatically ignored.
  • Strings with interpolated variables are now parsed ("Hello $thing").
  • Particular files and directories can be ignored. #1
  • Now supports installation via composer. #8
  • When there are errors detected, the exit code of the script will be 1 instead of 0.
  • Strings that are file path fragments are automatically ignored. #12
  • Strings that are MySQL query fragments are automatically ignored. #14
  • The ignores-tolerance can now be configured via the JSON config file. #15

Updated:

  • The HTML attribute name or the entire function call stack is shown in each error.
  • Child class methods are automatically ignored if the parent method is ignored.
  • Chained method calls ($this->method()->some_func()) are now followed and treated as a whole.
  • The WP_L10n_Validator::__construct() now accepts an array of text domains instead of just one.
  • Ignores defined in the JSON config file now override the default configuration. #6
  • When a l10n function is used without a text domain, an unexpected text domain ('') is reported, instead of a missing argument.
  • The cache files are written with pretty-printed JSON when possible. #11

Fixed:

  • Strings that begin with a leading underscore are now ignored with the rest of underscore strings that are ignored.
  • Method declarations are prefixed with the class name when checking against the ignores list.
  • Files which contain errors are always parsed, even if the cache shows that they haven't changed.
  • The parser is no longer messed up by complex variable expression syntax.
  • When the parser is unable to resolve a class name, it is reported as (unknown) instead of the method being treated as a procedural function.
  • The parent name of a class is properly detected when the class comes after a function declaration.
  • The ignores cache is updated instead of being reset when -c is used. #17
  • The cache is automatically invalidated when the configuration changes. #23