code: private static void checkDelete(NodeTraversal t, Node n) {
      if (n.getFirstChild().isName()) {
        Var v = t.getScope().getVar(n.getFirstChild().getString());
        if (v != null) {
          t.report(n, DELETE_VARIABLE);
        }
      }
    }
docs: Checks that variables, functions, and arguments are not deleted.