Add a linter rule to ensure that array elements occupy a single line each.
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- rARC830bcbc2a5e9: Add a linter rule for array elements
Added test cases.
Diff Detail
Diff Detail
- Repository
- rARC Arcanist
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/lint/linter/xhpast/rules/ArcanistArrayElementXHPASTLinterRule.php | ||
---|---|---|
38 ↗ | (On Diff #33423) | Maybe check $value->getLineNumber()? Or look at all the nonsemantic tokens? I think this raises a false positive on: array( /* OPEN */ 1, /* CLOSED */ 2, ); ...which is nonstandard in this codebase, but seems reasonable. |