魏名华

不要偷懒,做更好的自己

Nothing


No Welcome Message

Oclint

OCLint

shell

oclint-json-compilation-database -e Pods – -o=report_result.xml -report-type=pmd -stats -max-priority-1=9999 -max-priority-2=9999 -max-priority-3=9999

Rule Index

OCLint 0.12 includes 71 rules.

Basic

  • BitwiseOperatorInConditional(条件中包含位运算)
  • BrokenNullCheck
  • BrokenNilCheck
  • BrokenOddnessCheck(奇怪的检查)
  • CollapsibleIfStatements(可折叠的if语句)
  • ConstantConditionalOperator(conditionals are always true or always false:1 == 1)
  • ConstantIfExpression(conditionals are always true or always false:true)
  • DeadCode
  • DoubleNegative
  • ForLoopShouldBeWhileLoop
  • GotoStatement
  • JumbledIncrementer
  • MisplacedNullCheck
  • MisplacedNilCheck
  • MultipleUnaryOperator
  • ReturnFromFinallyBlock
  • ThrowExceptionFromFinallyBlock Cocoa
  • MissingHashMethod
  • MissingCallToBaseMethod
  • CallingProhibitedMethod
  • CallingProtectedMethod
  • MissingAbstractMethodImplementation Convention
  • AvoidBranchingStatementAsLastInLoop
  • ProblematicBaseClassDestructor
  • UnnecessaryDefaultStatement
  • MisplacedDefaultLabel
  • DestructorOfVirtualClass
  • InvertedLogic
  • MissingBreakInSwitchStatement
  • NonCaseLabelInSwitchStatement
  • AssignIvarOutsideAccessors
  • ParameterReassignment
  • PreferEarlyExit
  • MissingDefaultStatement
  • TooFewBranchesInSwitchStatement Design
  • AvoidDefaultArgumentsOnVirtualMethods
  • AvoidPrivateStaticMembers Empty
  • EmptyCatchStatement
  • EmptyDoWhileStatement
  • EmptyElseBlock
  • EmptyFinallyStatement
  • EmptyForStatement
  • EmptyIfStatement
  • EmptySwitchStatement
  • EmptyTryStatement
  • EmptyWhileStatement Migration
  • UseBoxedExpression
  • UseContainerLiteral
  • UseNumberLiteral
  • UseObjectSubscripting Naming
  • LongVariableName
  • ShortVariableName Redundant
  • RedundantConditionalOperator
  • RedundantIfStatement
  • RedundantLocalVariable
  • RedundantNilCheck
  • UnnecessaryElseStatement
  • UnnecessaryNullCheckForDealloc
  • UselessParentheses Size
  • HighCyclomaticComplexity
  • LongClass
  • LongLine
  • LongMethod
  • HighNcssMethod
  • DeepNestedBlock
  • HighNPathComplexity
  • TooManyFields
  • TooManyMethods
  • TooManyParameters Unused
  • UnusedLocalVariable
  • UnusedMethodParameter