]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule to detect duplicate `case` statements
authorJoshua Spence <josh@joshuaspence.com>
Sun, 4 Jan 2015 05:49:57 +0000 (16:49 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Sun, 4 Jan 2015 07:08:37 +0000 (18:08 +1100)
commitb31e9c0cfee0fdc5c5f68a758322f3b7e89488a7
tree76ad36e92b8b659833ca77ec34a7f5c850d57ff1
parent4e3df805844cb35bb6f500c3bf0c2a9cfe872ea3
Add a linter rule to detect duplicate `case` statements

Summary: Fixes T6843. Adds a linter rule to `ArcanistXHPASTLinter` to detect duplicate `case` statements within a `switch` statement.

Test Plan: Added test cases.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6843

Differential Revision: https://secure.phabricator.com/D11171
src/lint/linter/ArcanistXHPASTLinter.php
src/lint/linter/__tests__/xhpast/duplicate-switch-case.lint-test [new file with mode: 0644]