Alex Vandiver
5eda40337b
Fix missing whitespace in arc linters --help
message
...
Test Plan: Ran `arc linters --help`
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: epriestley
Differential Revision: https://secure.phabricator.com/D18344
2017-08-04 13:12:59 -07:00
Joshua Spence
5218ec357c
Add a table showing all XHPAST linter rules to the output of arc linters xhpast
...
Summary: Now that we have 91 subclasses of `ArcanistXHPASTLinterRule`, it is becoming difficult to manage the IDs. This diff adds a table to `arc linters xhpast` workflow to facilitate this.
Test Plan:
```
> arc xhpast-linter-rules
+=====+=======================================================+===================================================================+
| ID | Class | Name |
+=====+=======================================================+===================================================================+
| 1 | ArcanistSyntaxErrorXHPASTLinterRule | PHP Syntax Error! |
| 2 | ArcanistUnableToParseXHPASTLinterRule | Unable to Parse |
| 3 | ArcanistVariableVariableXHPASTLinterRule | Use of Variable Variable |
| 4 | ArcanistExtractUseXHPASTLinterRule | Use of `extract` |
| 5 | ArcanistUndeclaredVariableXHPASTLinterRule | Use of Undeclared Variable |
| 6 | ArcanistPHPShortTagXHPASTLinterRule | Use of Short Tag `<?` |
| 7 | ArcanistPHPEchoTagXHPASTLinterRule | Use of Echo Tag `<?=` |
| 8 | ArcanistPHPCloseTagXHPASTLinterRule | Use of Close Tag `?>` |
| 9 | ArcanistNamingConventionsXHPASTLinterRule | Naming Conventions |
| 10 | ArcanistImplicitConstructorXHPASTLinterRule | Implicit Constructor |
| 12 | ArcanistDynamicDefineXHPASTLinterRule | Dynamic `define` |
| 13 | ArcanistStaticThisXHPASTLinterRule | Use of `$this` in Static Context |
| 14 | ArcanistPregQuoteMisuseXHPASTLinterRule | Misuse of `preg_quote` |
| 15 | ArcanistPHPOpenTagXHPASTLinterRule | Expected Open Tag |
| 16 | ArcanistTodoCommentXHPASTLinterRule | TODO Comment |
| 17 | ArcanistExitExpressionXHPASTLinterRule | `exit` Used as Expression |
| 18 | ArcanistCommentStyleXHPASTLinterRule | Comment Style |
| 19 | ArcanistClassFilenameMismatchXHPASTLinterRule | Class-Filename Mismatch |
| 20 | ArcanistTautologicalExpressionXHPASTLinterRule | Tautological Expression |
| 21 | ArcanistPlusOperatorOnStringsXHPASTLinterRule | Not String Concatenation |
| 22 | ArcanistDuplicateKeysInArrayXHPASTLinterRule | Duplicate Keys in Array |
| 23 | ArcanistReusedIteratorXHPASTLinterRule | Reuse of Iterator Variable |
| 24 | ArcanistBraceFormattingXHPASTLinterRule | Brace Placement |
| 25 | ArcanistParenthesesSpacingXHPASTLinterRule | Spaces Inside Parentheses |
| 26 | ArcanistControlStatementSpacingXHPASTLinterRule | Space After Control Statement |
| 27 | ArcanistBinaryExpressionSpacingXHPASTLinterRule | Space Around Binary Operator |
| 28 | ArcanistArrayIndexSpacingXHPASTLinterRule | Spacing Before Array Index |
| 30 | ArcanistImplicitFallthroughXHPASTLinterRule | Implicit Fallthrough |
| 32 | ArcanistReusedAsIteratorXHPASTLinterRule | Variable Reused As Iterator |
| 34 | ArcanistCommentSpacingXHPASTLinterRule | Comment Spaces |
| 36 | ArcanistSlownessXHPASTLinterRule | Slow Construct |
| 37 | ArcanistCallParenthesesXHPASTLinterRule | Call Formatting |
| 38 | ArcanistDeclarationParenthesesXHPASTLinterRule | Declaration Formatting |
| 39 | ArcanistReusedIteratorReferenceXHPASTLinterRule | Reuse of Iterator References |
| 40 | ArcanistKeywordCasingXHPASTLinterRule | Keyword Conventions |
| 41 | ArcanistDoubleQuoteXHPASTLinterRule | Unnecessary Double Quotes |
| 42 | ArcanistElseIfUsageXHPASTLinterRule | `elseif` Usage |
| 43 | ArcanistSemicolonSpacingXHPASTLinterRule | Semicolon Spacing |
| 44 | ArcanistConcatenationOperatorXHPASTLinterRule | Concatenation Spacing |
| 45 | ArcanistPHPCompatibilityXHPASTLinterRule | PHP Compatibility |
| 46 | ArcanistLanguageConstructParenthesesXHPASTLinterRule | Language Construct Parentheses |
| 47 | ArcanistEmptyStatementXHPASTLinterRule | Empty Block Statement |
| 48 | ArcanistArraySeparatorXHPASTLinterRule | Array Separator |
| 49 | ArcanistConstructorParenthesesXHPASTLinterRule | Constructor Parentheses |
| 50 | ArcanistDuplicateSwitchCaseXHPASTLinterRule | Duplicate Case Statements |
| 51 | ArcanistBlacklistedFunctionXHPASTLinterRule | Use of Blacklisted Function |
| 52 | ArcanistImplicitVisibilityXHPASTLinterRule | Implicit Method Visibility |
| 53 | ArcanistCallTimePassByReferenceXHPASTLinterRule | Call-Time Pass-By-Reference |
| 54 | ArcanistFormattedStringXHPASTLinterRule | Formatted String |
| 55 | ArcanistUnnecessaryFinalModifierXHPASTLinterRule | Unnecessary Final Modifier |
| 56 | ArcanistUnnecessarySemicolonXHPASTLinterRule | Unnecessary Semicolon |
| 57 | ArcanistSelfMemberReferenceXHPASTLinterRule | Self Member Reference |
| 58 | ArcanistLogicalOperatorsXHPASTLinterRule | Logical Operators |
| 59 | ArcanistInnerFunctionXHPASTLinterRule | Inner Functions |
| 60 | ArcanistDefaultParametersXHPASTLinterRule | Default Parameters |
| 61 | ArcanistLowercaseFunctionsXHPASTLinterRule | Lowercase Functions |
| 62 | ArcanistClassNameLiteralXHPASTLinterRule | Class Name Literal |
| 63 | ArcanistUselessOverridingMethodXHPASTLinterRule | Useless Overriding Method |
| 64 | ArcanistNoParentScopeXHPASTLinterRule | No Parent Scope |
| 65 | ArcanistAliasFunctionXHPASTLinterRule | Alias Functions |
| 66 | ArcanistCastSpacingXHPASTLinterRule | Cast Spacing |
| 67 | ArcanistToStringExceptionXHPASTLinterRule | Throwing Exception in `__toString` Method |
| 68 | ArcanistLambdaFuncFunctionXHPASTLinterRule | `__lambda_func` Function |
| 69 | ArcanistInstanceOfOperatorXHPASTLinterRule | `instanceof` Operator |
| 70 | ArcanistInvalidDefaultParameterXHPASTLinterRule | Invalid Default Parameter |
| 71 | ArcanistModifierOrderingXHPASTLinterRule | Modifier Ordering |
| 72 | ArcanistInvalidModifiersXHPASTLinterRule | Invalid Modifiers |
| 73 | ArcanistUnaryPrefixExpressionSpacingXHPASTLinterRule | Space After Unary Prefix Operator |
| 74 | ArcanistObjectOperatorSpacingXHPASTLinterRule | Object Operator Spacing |
| 75 | ArcanistUnaryPostfixExpressionSpacingXHPASTLinterRule | Space Before Unary Postfix Operator |
| 76 | ArcanistArrayValueXHPASTLinterRule | Array Element |
| 77 | ArcanistListAssignmentXHPASTLinterRule | List Assignment |
| 78 | ArcanistInlineHTMLXHPASTLinterRule | Inline HTML |
| 79 | ArcanistGlobalVariableXHPASTLinterRule | Global Variables |
| 80 | ArcanistParseStrUseXHPASTLinterRule | Questionable Use of `parse_str` |
| 81 | ArcanistNewlineAfterOpenTagXHPASTLinterRule | Newline After PHP Open Tag |
| 82 | ArcanistEmptyFileXHPASTLinterRule | Empty File |
| 83 | ArcanistParentMemberReferenceXHPASTLinterRule | Parent Member Reference |
| 84 | ArcanistArrayCombineXHPASTLinterRule | `array_combine()` Unreliable |
| 85 | ArcanistDeprecationXHPASTLinterRule | Use of Deprecated Function |
| 86 | ArcanistUnsafeDynamicStringXHPASTLinterRule | Unsafe Usage of Dynamic String |
| 87 | ArcanistRaggedClassTreeEdgeXHPASTLinterRule | Class Not `abstract` Or `final` |
| 88 | ArcanistClassExtendsObjectXHPASTLinterRule | Class Not Extending `Phobject` |
| 90 | ArcanistNestedNamespacesXHPASTLinterRule | Nested `namespace` Statements |
| 91 | ArcanistThisReassignmentXHPASTLinterRule | `$this` Reassignment |
| 92 | ArcanistUnexpectedReturnValueXHPASTLinterRule | Unexpected `return` Value |
| 97 | ArcanistUseStatementNamespacePrefixXHPASTLinterRule | `use` Statement Namespace Prefix |
| 99 | ArcanistUnnecessarySymbolAliasXHPASTLinterRule | Unnecessary Symbol Alias |
| 107 | ArcanistAbstractPrivateMethodXHPASTLinterRule | `abstract` Method Cannot Be Declared `private` |
| 108 | ArcanistAbstractMethodBodyXHPASTLinterRule | `abstract` Method Cannot Contain Body |
| 113 | ArcanistClassMustBeDeclaredAbstractXHPASTLinterRule | `class` Containing `abstract` Methods Must Be Declared `abstract` |
+=====+=======================================================+===================================================================+
```
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: Korvin
Differential Revision: https://secure.phabricator.com/D14563
2015-12-02 06:27:33 +11:00
Aviv Eyal
bdab422440
arc linters: switch name
and short
...
Summary: I think they were wrong.
Test Plan: `arc linters nolint`. It would fail without it.
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: epriestley, #lint
Differential Revision: https://secure.phabricator.com/D14084
2015-09-08 10:39:26 -07:00
Aviv Eyal
1ed98937c4
arc linters: Filter by name, make display one-line
...
Summary: allow searching/filtering linters displayed by name.
Test Plan:
`$ arc linters --verbose --search JSon --search ruby` (Lots of text about many linters)
`$ arc linters --search JSon ruby` (error message)
`$ arc linters python` (no results, "try --search").
`$ arc linters ruby` (Verbose text about the "ruby" linter).
Reviewers: joshuaspence, #blessed_reviewers, epriestley
Reviewed By: joshuaspence, #blessed_reviewers, epriestley
Subscribers: Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D10706
2015-08-29 05:10:03 -07:00
Joshua Spence
0e09578720
Use PhutilClassMapQuery instead of PhutilSymbolLoader
...
Summary: Use `PhutilClassMapQuery` instead of `PhutilSymbolLoader`, mainly for consistency. Depends on D13572 .
Test Plan: This hasn't been tested very comphrehensively as of yet.
Reviewers: epriestley, #blessed_reviewers
Reviewed By: epriestley, #blessed_reviewers
Subscribers: epriestley, Korvin
Differential Revision: https://secure.phabricator.com/D13573
2015-08-11 06:50:47 +10:00
Joshua Spence
d2b38cdf94
pht
all the things
...
Summary: `pht`ize almost all strings in rARC.
Test Plan: ¯\_(ツ)_/¯
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: aurelijus, Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D12607
2015-05-13 21:00:53 +10:00
Joshua Spence
ef18ae08eb
Don't explicitly name abstract base classes
...
Summary:
Ref T5655 . It is superfluous to include "base" in the name of an abstract base class. Furthermore, it is not done consistently within the code base.
In order to retain compatibility with external code, I have kept the `ArcanistBaseWorkflow` class (which trivially extends from `ArcanistWorkflow`), but it is now deprecated and should output a warning message. Similarly for `ArcanistBaseUnitTestEngine`.
Test Plan: Created a workflow which extends from `ArcanistBaseWorkflow`. Executed the workflow and saw a deprecation warning.
Reviewers: #blessed_reviewers, epriestley
Reviewed By: #blessed_reviewers, epriestley
Subscribers: epriestley, Korvin, aurelijus
Maniphest Tasks: T5655
Differential Revision: https://secure.phabricator.com/D9983
2014-07-22 07:49:15 +10:00
epriestley
f64dee022e
Fix "arc linters" if no engine is built or configured
...
Summary: `$engine` will be undefined here. This was just copy/paste derp, combined with me accidentally having an `.arclint` file in a place I didn't expect to have one when I tried to test this.
Test Plan: Ran `arc linters` in a totally bare, non-.arclint-having working copy
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: epriestley
Differential Revision: https://secure.phabricator.com/D9255
2014-05-22 10:36:31 -07:00
epriestley
54c377448d
Provide arc linters --verbose
to list all available options
...
Summary:
Ref T2039 . I'll update the corresponding documentation.
It feels a little awkward that this is disconnected from `getLinterConfigurationOptions()`, but I dislike returning weird ad-hoc structures more than I dislike having two methods. Most linters don't implement either of these anyway.
Test Plan: Ran `arc linters` and `arc linters --verbose`.
Reviewers: btrahan, joshuaspence
Reviewed By: joshuaspence
Subscribers: epriestley
Maniphest Tasks: T2039
Differential Revision: https://secure.phabricator.com/D9062
2014-05-11 20:23:07 -07:00
epriestley
e13f5839d4
Add 'arc linters' to list available linters and status
...
Summary: Ref T2039 . We're starting to get kind of a lot of linters; provide `arc linters` to help users review and understand them and construct `.arclint` files.
Test Plan: {F152205}
Reviewers: btrahan, joshuaspence
Reviewed By: btrahan, joshuaspence
Subscribers: epriestley
Maniphest Tasks: T2039
Differential Revision: https://secure.phabricator.com/D9041
2014-05-11 13:42:56 -07:00