Releases: JDGrimes/wp-l10n-validator
Releases · JDGrimes/wp-l10n-validator
0.4.0
Added
- Support for running against a list of files. #33
aria-hidden
,cols
,rows
,min
,max
, andalign
to the list of ignored attributes._get_list_table()
,wp_reschedule_event()
,get_submit_button()
, andchecked()
to the list of ignored WordPress functions.DateTime::__construct()
to the list of ignored PHP functions.UNION ALL
,HAVING
,GROUP BY
,EXISTS
, andSIGNED
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
0.3.0
0.2.0
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 of0
. - 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