]> khamidou — GitHub mirrors - arcanist.git/commit
Raise a lint warning for classes not marked "abstract", "final" or
authorepriestley <git@epriestley.com>
Sat, 28 Jan 2012 19:29:30 +0000 (11:29 -0800)
committerepriestley <git@epriestley.com>
Sat, 28 Jan 2012 19:29:30 +0000 (11:29 -0800)
commitf70afcd705f7f29ed491b5ed607f1007fd11ddb8
tree209297e5a3d4dbe7d14c605243f7958ec759540c
parent3ccb418b933afe69a0ae309dbba8c047508221c7
Raise a lint warning for classes not marked "abstract", "final" or
"@concrete-extensible"

Summary:
See T795. I think ~all classes in the classtree should be "abstract" or "final",
but I provided "@concrete-extensible" if you really have "Rectangle extends
Square extends Shape" or something.

I'm not totally sure this should be enabled globally by default, maybe I should
default it to DISABLED and then enable it for libphutil/arcanist/Phabricator? It
feels like it might be a little overbearing to push on everyone by defualt.

Test Plan: See unit tests.

Reviewers: btrahan, aran, nh, arudolph, jungejason

Reviewed By: btrahan

CC: aran, epriestley
Maniphest Tasks: T795

Differential Revision: https://secure.phabricator.com/D1510
12 files changed:
src/lint/engine/phutil/PhutilLintEngine.php
src/lint/engine/phutil/__init__.php
src/lint/linter/xhpast/ArcanistXHPASTLinter.php
src/lint/linter/xhpast/__init__.php
src/lint/linter/xhpast/__tests__/ArcanistXHPASTLinterTestCase.php
src/lint/linter/xhpast/__tests__/__init__.php
src/lint/linter/xhpast/__tests__/data/naming-conventions.lint-test
src/lint/linter/xhpast/__tests__/data/parens-hug-contents.lint-test
src/lint/linter/xhpast/__tests__/data/ragged-classtree-edges.lint-test [new file with mode: 0644]
src/lint/linter/xhpast/__tests__/data/surprising-constructors.lint-test
src/lint/linter/xhpast/__tests__/data/undeclared-variables.lint-test
src/lint/linter/xhpast/__tests__/data/use-of-this-in-static-method.lint-test