Re: JavadocMethod checks for @see annotations

Oliver Burn <[email protected]> Wed, 23 Nov 2011 07:26:06 +1100
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <CAHZftdXnVBAOxH5CVybxA38mttMF3AU3dU+bMjRThfr7qWt=OQ@mail.gmail.com>
--===============0725032336308748022==
Content-Type: multipart/alternative; boundary=00151773ea64eadc6c04b2589c6d

--00151773ea64eadc6c04b2589c6d
Content-Type: text/plain; charset=ISO-8859-1

Glad you like the tool.

I believe you will need a custom check to implement the behaviour you are
seeking.

It should be easy to copy/modify the existing check.

On Wed, Nov 23, 2011 at 05:19, Stephen Gaffigan <
[email protected]> wrote:

>  Hello,
>
> I've recently begun using checkstyle to check Javadoc compliance in my
> Java projects.  I use it through ant as well as through the eclipse-cs
> plugin.  I've found it very easy to install and get configured, and it's a
> great replacement for the previous tool I used for this purpose (Sun
> DocCheck).
>
> I'm looking for a JavadocMethod check that checks for @see annotations in
> get and set access methods.  For example, I'd want errors/warnings if
> either of the @see annotations were missing in the below code.  Is this
> possible with checkstyle?  Does it require that I write a custom check?
>
> /**
>   * Get access method for foo.
>   * @return Foo
>   * @see #setFoo(Foo)
>   */
> public Foo getFoo() {
>    return this.foo;
> }
>
> /**
>   * Set access method for foo.
>   * @param foo Value to set
>   * @see #getFoo()
>   */
> public void setFoo(Foo foo) {
>    this.foo = foo;
> }
>
> Thanks for the great tool.
>
> Steve
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> Checkstyle-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/checkstyle-user
>
>

--00151773ea64eadc6c04b2589c6d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Glad you like the tool.<br><br>I believe you will need a custom check to im=
plement the behaviour you are seeking.<br><br>It should be easy to copy/mod=
ify the existing check.<br><br><div class=3D"gmail_quote">On Wed, Nov 23, 2=
011 at 05:19, Stephen Gaffigan <span dir=3D"ltr">&lt;<a href=3D"mailto:step=
[email protected]">[email protected]</a=
>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">
 =20

   =20
 =20
  <div bgcolor=3D"#FFFFFF" text=3D"#000000">
    Hello,<br>
    <br>
    I&#39;ve recently begun using checkstyle to check Javadoc compliance in
    my Java projects.=A0 I use it through ant as well as through the
    eclipse-cs plugin.=A0 I&#39;ve found it very easy to install and get
    configured, and it&#39;s a great replacement for the previous tool I
    used for this purpose (Sun DocCheck).<br>
    <br>
    I&#39;m looking for a JavadocMethod check that checks for @see
    annotations in get and set access methods.=A0 For example, I&#39;d want
    errors/warnings if either of the @see annotations were missing in
    the below code.=A0 Is this possible with checkstyle?=A0 Does it require
    that I write a custom check?<br>
    <br>
    <font face=3D"Courier New, Courier, monospace">/**<br>
      =A0 * Get access method for foo.<br>
      =A0 * @return Foo<br>
      =A0 * @see #setFoo(Foo)<br>
      =A0 */<br>
      public Foo getFoo() {<br>
      =A0=A0 return this.foo;<br>
      }<br>
      <br>
      /**<br>
      =A0 * Set access method for foo.<br>
      =A0 * @param foo Value to set<br>
      =A0 * @see #getFoo()<br>
      =A0 */<br>
      public void setFoo(Foo foo) {<br>
      =A0=A0 this.foo =3D foo;<br>
      }<br>
    </font><br>
    Thanks for the great tool.<br>
    <br>
    Steve<br>
    <br>
  </div>

<br>-----------------------------------------------------------------------=
-------<br>
All the data continuously generated in your IT infrastructure<br>
contains a definitive record of customers, application performance,<br>
security threats, fraudulent activity, and more. Splunk takes this<br>
data and makes sense of it. IT sense. And common sense.<br>
<a href=3D"http://p.sf.net/sfu/splunk-novd2d" target=3D"_blank">http://p.sf=
.net/sfu/splunk-novd2d</a><br>_____________________________________________=
__<br>
Checkstyle-user mailing list<br>
<a href=3D"mailto:[email protected]">Checkstyle-user@li=
sts.sourceforge.net</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/checkstyle-user" ta=
rget=3D"_blank">https://lists.sourceforge.net/lists/listinfo/checkstyle-use=
r</a><br>
<br></blockquote></div><br>

--00151773ea64eadc6c04b2589c6d--


--===============0725032336308748022==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
--===============0725032336308748022==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Checkstyle-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user

--===============0725032336308748022==--