Ref T7409. Add a linter rule to ensure that a cast is not followed by a space. This is largely based on Generic_Sniffs_Formatting_NoSpaceAfterCastSniff.
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T7409: Implement PHPCS lints
- Commits
- rARC2e66d03c68e4: Add a linter rule for spacing after a cast
Added unit tests.
Diff Detail
Diff Detail
- Repository
- rARC Arcanist
- Branch
- master
- Lint
Lint Passed - Unit
Test Failures - Build Status
Buildable 5249 Build 5267: [Placeholder Plan] Wait for 30 Seconds
Time | Test | |
---|---|---|
1,254 ms | ArcanistPuppetLintLinterTestCase::testLinter | |
956 ms | ArcanistCSSLintLinterTestCase::testLinter | |
154 ms | ArcanistCSSLintLinterTestCase::testVersion | |
126 ms | ArcanistChmodLinterTestCase::testLinter | |
260 ms | ArcanistClosureLinterTestCase::testLinter | |
View Full Test Results (1 Failed · 48 Passed · 4 Skipped) |
Event Timeline
Comment Actions
I want to retain the current rule. I believe we're consistent about it everwhere.
(I don't think I've personally ever seen real code using the (type) var style.)
Comment Actions
That's fine with me, I don't care about it too much. It does raise the question of configuring the ArcanistXHPASTLinter though... Currently the linter imposes a certain style which can be selectively enabled or disabled but not configured. We could reasonably add a xhpast.space-after-cast configuration but doing this for every linter rule seems like a lot of work.