Skip to content

Releases: JDGrimes/wp-l10n-validator

0.4.0

20 Dec 21:39
091f273
Compare
Choose a tag to compare

Added

  • Support for running against a list of files. #33
  • aria-hidden, cols, rows, min, max, and align to the list of ignored attributes.
  • _get_list_table(), wp_reschedule_event(), get_submit_button(), and checked() to the list of ignored WordPress functions.
  • DateTime::__construct() to the list of ignored PHP functions.
  • UNION ALL, HAVING, GROUP BY, EXISTS, and SIGNED to the list of ignored SQL keywords.
  • Support for PHP 7.2.
  • Ignores logic for all-lowercase strings containing hyphens (-) and no spaces. #37
  • Support for ignoring all-lowercase strings with the all-lowercase ignores-rule. #38

Changed

  • Underscored strings are now ignored regardless of case. #34
  • The default paths for the cache files. #29

Removed

  • Support for HHVM.

0.3.1

02 Nov 21:19
Compare
Choose a tag to compare

Fixed

  • Whitespace being reported as the caller for a method. #31
  • add_ignored_atts() overwriting the atts after the first call. #30
  • preg_quote() not being ignored.
  • Cache keys and groups not being ignored in WordPress caching functions.

0.3.0

30 Oct 14:48
Compare
Choose a tag to compare

New

  • Support for interfaces. #27
  • Class properties can now be ignored. #26

Fixed

  • Ignored arguments not being ignored in some cases. #28

0.2.0

30 Mar 21:36
Compare
Choose a tag to compare

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

v0.1.1

12 Nov 16:39
Compare
Choose a tag to compare

Fix some nasty bugs in the initial release. Adds unit tests for the command line usage so it doesn't happen again. All tests pass.

v0.1.0

10 Nov 22:18
Compare
Choose a tag to compare

Initial release.