Rule Index 規則索引
OCLint 0.10.3 includes 71 rules.
- Basic 基本
- 條件位運算 BitwiseOperatorInConditional
- 錯誤Null檢查 BrokenNullCheck
- 錯誤Nil檢查 BrokenNilCheck
- 特殊判斷檢查 BrokenOddnessCheck
- 可以合併if語句 CollapsibleIfStatements
- 恆定條件運算 ConstantConditionalOperator
- IF條件恆定 ConstantIfExpression
- 無效代碼 DeadCode
- 雙重否定 DoubleNegative
- For應該轉換爲While ForLoopShouldBeWhileLoop
- Goto語句 GotoStatement
- 混亂的增量 JumbledIncrementer
- 錯位的Null檢查 MisplacedNullCheck
- 錯位的Nil檢查 MisplacedNilCheck
- 多餘運算符 MultipleUnaryOperator
- Finally包含Return ReturnFromFinallyBlock
- Finally拋出異常 ThrowExceptionFromFinallyBlock
- Cocoa
- Convention 約定
- 循環最後避免分支 AvoidBranchingStatementAsLastInLoop
- BaseClassDestructorShouldBeVirtualOrProtected
- 全覆蓋的Switch不需要默認值CoveredSwitchStatementsDontNeedDefault
- default應該在Witch語句最後 DefaultLabelNotLastInSwitchStatement
- 虛擬類的析構函數 DestructorOfVirtualClass
- 邏輯倒置 InvertedLogic
- Switch語句缺少Break MissingBreakInSwitchStatement
- Switch中非case NonCaseLabelInSwitchStatement
- IvarAssignmentOutsideAccessorsOrInit
- 參數值重置 ParameterReassignment
- 使用短判斷 UseEarlyExitsAndContinue
- Switch缺少Default SwitchStatementsShouldHaveDefault
- Switch分支語句太少 TooFewBranchesInSwitchStatement
- Design 設計
- Empty 空
- Migration
- Naming 命名
- Redundant 沉餘
- Size 大小
- Unused 無用