Add a linter rule to advise against the use of hardcoded class names. Hardcoded class names make the code harder to refactor and it is generally preferable to use the __CLASS__ magic constant instead.
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- rARC9090efcb40ed: Add a linter rule to prevent hardcoded class names
This works, but needs some polish.
Diff Detail
Diff Detail
- Repository
- rARC Arcanist
- Branch
- master
- Lint
Lint Passed - Unit
Test Failures - Build Status
Buildable 5916 Build 5936: [Placeholder Plan] Wait for 30 Seconds
Time | Test | |
---|---|---|
1,211 ms | ArcanistXMLLinterTestCase::testLinter | |
3,450 ms | ArcanistCSSLintLinterTestCase::testLinter | |
423 ms | ArcanistCSSLintLinterTestCase::testVersion | |
646 ms | ArcanistChmodLinterTestCase::testLinter | |
452 ms | ArcanistClosureLinterTestCase::testLinter | |
View Full Test Results (1 Failed · 47 Passed · 4 Skipped) |
Event Timeline
Comment Actions
Use a regex for matching... this means that PhabricatorUser won't be matched in the PhabricatorUserEditor class, for example.