/*
 * Copyright 2011 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.errorprone;

import java.lang.annotation.Retention;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * An annotation intended for implementations of Matcher which is picked up by our
 * documentation processor.
 * @author eaftan@google.com (Eddie Aftandilian)
 */
@Retention(RUNTIME)
public @interface BugPattern {

  String name();    // ID of this bug, used in @SuppressWarnings. Should be unique

  String[] altNames() default {};    // Alternate IDs for this bug, which may also be used in
                                     // @SuppressWarnings

  LinkType linkType() default LinkType.WIKI;
  String link() default "";     // Used for the link if linkType() is CUSTOM.

  public enum LinkType {
    WIKI,       // Link to wiki
    CUSTOM,     // Custom string
    NONE        // No link should be displayed
  }

  Category category();

  public enum Category {
    JDK,        // general Java or JDK errors
    GUAVA,      // errors specific to Guava
    ONE_OFF     // one-off refactorings that are not general errors
  }

  /**
   * Wiki syntax not allowed
   */
  String summary();

  /**
   * Wiki syntax allowed
   */
  String explanation();

  SeverityLevel severity();

  public enum SeverityLevel {
    ERROR,
    WARNING,
    OFF         // should not be used for general code
  }

  MaturityLevel maturity();

  public enum MaturityLevel {
    ON_BY_DEFAULT,
    EXPERIMENTAL,
    PROPOSED,
  }
}

@@ -966,31 +966,26 @@
 n %7B%0A
-%0A  String name();    //
+  /**%0A   * @return
  ID 
@@ -1041,16 +1041,21 @@
  unique%0A
+   */
 %0A  Strin
@@ -1059,39 +1059,36 @@
 ring
-%5B%5D altN
+ n
 ame
-s
 ()
- default %7B%7D;    //
+;%0A%0A  /**%0A   * @return
  Alt
@@ -1141,191 +1141,318 @@
 d in
-%0A                                     // @SuppressWarnings%0A%0A  LinkType linkType() default LinkType.WIKI;%0A  String link() default %22%22;     // Used for the link if linkType() is CUSTOM.%0A
+ @SuppressWarnings%0A   */%0A  String%5B%5D altNames() default %7B%7D;%0A%0A  LinkType linkType() default LinkType.WIKI;%0A%0A  /**%0A   * @return Used for the link if linkType() is CUSTOM.%0A   */%0A  String link() default %22%22;%0A%0A  /**%0A   * What link to show users in the javac error message, so they can learn more about the error%0A   */
 %0A  p
@@ -1481,22 +1481,18 @@
     
-WIKI,
+/**%0A
      
-  //
+*
  Lin
@@ -1504,60 +1504,117 @@
 wiki
-%0A    CUSTOM,     // Custom string%0A    NONE        //
+, using the name identifier%0A     */%0A    WIKI,%0A    /**%0A     * Custom string%0A     */%0A    CUSTOM,%0A    /**%0A     *
  No 
@@ -1638,16 +1638,33 @@
 splayed%0A
+     */%0A    NONE%0A
   %7D%0A%0A  C
@@ -1717,22 +1717,18 @@
     
-JDK,
+/**%0A
      
-   //
+*
  gen
@@ -1759,22 +1759,35 @@
     
-GUAVA,      //
+ */%0A    JDK,%0A    /**%0A     *
  err
@@ -1816,22 +1816,37 @@
     
-ONE_OFF     //
+ */%0A    GUAVA,%0A    /**%0A     *
  one
@@ -1891,16 +1891,36 @@
  errors%0A
+     */%0A    ONE_OFF%0A
   %7D%0A%0A  /
@@ -2131,22 +2131,18 @@
     
-OFF    
+/**%0A
      
-//
+*
  sho
@@ -2174,16 +2174,32 @@
 al code%0A
+     */%0A    OFF%0A
   %7D%0A%0A  M

Change comments to javadoc, so these are easier to fill in