| 6 |
* Supplementary Coder module to provide Morbus' style complaints. |
* Supplementary Coder module to provide Morbus' style complaints. |
| 7 |
* |
* |
| 8 |
* @todo get rid of coder_tough_love_remove_known_keys once concat bug fixed. |
* @todo get rid of coder_tough_love_remove_known_keys once concat bug fixed. |
| 9 |
|
* @todo <a is allowed inside a t() for translating purposes. |
| 10 |
|
* @todo <a href="@..." > but disallow <a href="http://.... >. |
| 11 |
*/ |
*/ |
| 12 |
|
|
| 13 |
/** |
/** |
| 122 |
|
|
| 123 |
// Miscellany |
// Miscellany |
| 124 |
array( |
array( |
|
'#type' => 'regex', |
|
|
'#value' => '\s*else\s+if\s*\(', |
|
|
'#warning' => t('Use "elseif" not "else if".'), |
|
|
), |
|
|
array( |
|
| 125 |
'#source' => 'quote', |
'#source' => 'quote', |
| 126 |
'#type' => 'regex', |
'#type' => 'regex', |
| 127 |
'#value' => '<(a|img|table)(\s|>)', |
'#value' => '<(a|img|table)(\s|>)', |
| 272 |
|
|
| 273 |
function _coder_tough_love_doxygen_param_types_warning() { |
function _coder_tough_love_doxygen_param_types_warning() { |
| 274 |
return array( |
return array( |
| 275 |
'#warning' => t('@param and @return syntax does not indicate the data type.'), |
'#warning' => t('@param and @return syntax should not indicate the data type.'), |
| 276 |
'#link' => 'http://drupal.org/node/1354', |
'#link' => 'http://drupal.org/node/1354', |
| 277 |
); |
); |
| 278 |
} |
} |