zoukankan      html  css  js  c++  java
  • 代码规范性检查

    1. [主要] A method/constructor shouldnt explicitly throw java.lang.Exception 方法或构造方法不应该显式的抛Exception
      •   It is unclear which exceptions that can be thrown from the methods. It might be difficult to document and understand the vague interfaces. Use either a class derived from RuntimeException or a checked exception.
    2. [主要] Avoid really long methods. 
      •   Violations of this rule usually indicate that the method is doing too much. Try to reduce the method size by creating helper methods and removing any copy/pasted code.
    3. Throwing 'Throwable' is not allowed 1
    4. Method length is xx lines (max allowed is 50). 64
    5. Avoid unused method parameters such as 'xxxx' 8
    6. Class Xxxxx should be declared as final 1
      •   Checks that class which has only private constructors is declared as final.
    7. xxxx must be non-null but is marked as nullable 11

      •   This parameter is always used in a way that requires it to be nonnull, but the parameter is explicitly annotated as being Nullable. Either the use of the parameter or the annotation is wrong.
    8.  

      Overridable method 'setIsRestart' called during object construction 3
  • 相关阅读:
    LeetCode Valid Sudoku
    接下来复习的重点
    leetcode:LRU Cache
    [leetcode] Insertion Sort List
    [QT Creator]LNK1123: 转换到 COFF 期间失败: 文件无效或损坏 。
    [leetcode]Sort List
    李开复的七封信
    (归并排序)
    应聘面试自我介绍范文
    判断一颗二叉树是否是平衡二叉树
  • 原文地址:https://www.cnblogs.com/lingear/p/5996046.html
Copyright © 2011-2022 走看看