-
Bug
-
Resolution: Fixed
-
Minor
-
2.7.13
-
None
-
MOODLE_27_STABLE
-
MOODLE_27_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
It seems that the recent move to upstream indentation checker is causing a number of new reports when nested structures are used and closed (parenthesis) all together, instead of step by step.
Example:
$somevariable = some_function(another_function($param1, $param2),
|
more_function($param3, array(
|
$key1 => $value1,
|
$key2 => $value2)));
|
$continue = this_line_is_correct_but_codechecher_reports_eight_spaces_needed();
|
The question is...
A) should we ask for closing parenthesis to be un-indented step by step, exactly the same than closing curly brackets.
$somevariable = some_function(another_function($param1, $param2),
|
more_function($param3, array(
|
$key1 => $value1,
|
$key2 => $value2)
|
)
|
);
|
$continue = this_line_is_correct_and_works_ok();
|
B) Or, at very least, ask for the final parenthesis to close the whole sentence with correct indent in separate line.
$somevariable = some_function(another_function($param1, $param2),
|
more_function($param3, array(
|
$key1 => $value1,
|
$key2 => $value2))
|
);
|
$continue = this_line_is_correct_and_works_ok();
|
C) Or closing the parenthesis at the 1st indentation level also works:
$somevariable = some_function(another_function($param1, $param2),
|
more_function($param3, array(
|
$key1 => $value1,
|
$key2 => $value2))
|
);
|
$continue = this_line_is_correct_and_works_ok();
|
D) Or do we really want to allow the example above to be valid?
- is duplicated by
-
CONTRIB-6195 Codechecker whitespace sniffs seem to be off
- Closed