# Disable codacy check for "At-clause should have a non-empty description"

**URL:** <https://talk.openmrs.org/t/disable-codacy-check-for-at-clause-should-have-a-non-empty-description/10820>\
**Category:** Development\
**Created:** [March 29, 2017, 11:03am UTC](https://talk.openmrs.org/t/disable-codacy-check-for-at-clause-should-have-a-non-empty-description/10820 "2017-03-29T11:03:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![darius](https://talk.openmrs.org/user_avatar/talk.openmrs.org/darius/32/8082_2.png) [@darius](https://talk.openmrs.org/u/darius)\
**Post date:** [March 29, 2017, 11:03am UTC](https://talk.openmrs.org/t/disable-codacy-check-for-at-clause-should-have-a-non-empty-description/10820/1 "2017-03-29T11:03:29Z")

</div>

I see Codacy making this comment on a PR:

```
+	/**
+ * Helper method to ensure the program is set to the given workflow by doing the validations
+ * @param workflow
Codacy Issue found: At-clause should have a non-empty description.

```

I vote we disable this: we have so many boilerplate methods in our code (unfortunately) that it’s just not worth documenting obvious parameters.

@teleivo, what do you think?

---

<div class="post-metadata">

**Author:** ![teleivo](https://talk.openmrs.org/user_avatar/talk.openmrs.org/teleivo/32/2015_2.png) [@teleivo](https://talk.openmrs.org/u/teleivo)\
**Post date:** [March 29, 2017, 11:23am UTC](https://talk.openmrs.org/t/disable-codacy-check-for-at-clause-should-have-a-non-empty-description/10820/2 "2017-03-29T11:23:53Z")

</div>

Do you mean if you add a new method and don’t fill out the javadoc parameter?

If we want javadocs that have a parameter description I think we should keep it in otherwise we will not get to there. And update our tools (templates, IDE settings) to do the boring job.

In case we have parameters where its really obvious like what you showed `workflow` I hope there is an easy fix to that.

In Eclipse you can manipulate Code Templates like

 ![](https://talk.openmrs.org/uploads/default/original/2X/5/537a80442e45cae876296b55d3101478263041fc.png)

which does the job for setters well. Unfortunately the `Methods` template

 ![](https://talk.openmrs.org/uploads/default/original/2X/6/629f8aeb89ca330405c8cfbda7c1e73e5d00f0e6.png)

just adds the empty `@param`.

Maybe someone else (an IDE wizard) has a solution for us 🙂

---

<div class="post-metadata">

**Author:** ![teleivo](https://talk.openmrs.org/user_avatar/talk.openmrs.org/teleivo/32/2015_2.png) [@teleivo](https://talk.openmrs.org/u/teleivo)\
**Post date:** [March 29, 2017, 11:38am UTC](https://talk.openmrs.org/t/disable-codacy-check-for-at-clause-should-have-a-non-empty-description/10820/3 "2017-03-29T11:38:13Z")

</div>

ah, Ive just seen the commit that caused this. Well in this specific commit, these are private methods which are very short and have meaningful names, I dont think javadocs are needed there at all. Mostly because they dont add any value IMHO.

---

<div class="post-metadata">

**Author:** ![lluismf](https://talk.openmrs.org/user_avatar/talk.openmrs.org/lluismf/32/770_2.png) [@lluismf](https://talk.openmrs.org/u/lluismf)\
**Post date:** [March 29, 2017, 1:34pm UTC](https://talk.openmrs.org/t/disable-codacy-check-for-at-clause-should-have-a-non-empty-description/10820/4 "2017-03-29T13:34:57Z")

</div>

For getters and setters I wish we could just add a @Property annotation and get rid of the methods. We also could use Kotlin 🙂

---

<div class="post-metadata">

**Author:** ![darius](https://talk.openmrs.org/user_avatar/talk.openmrs.org/darius/32/8082_2.png) [@darius](https://talk.openmrs.org/u/darius)\
**Post date:** [March 30, 2017, 7:11am UTC](https://talk.openmrs.org/t/disable-codacy-check-for-at-clause-should-have-a-non-empty-description/10820/5 "2017-03-30T07:11:28Z")

</div>

I didn’t actually look at the specific code in this case, I was thinking about this in general.

For me, javadoc that provides no information is worse than useless.

The worst case is what eclipse generates for getters/setters, e.g. `@param program the program to set` and `@return the program`. (Because you actually have to read this to realize it’s useless.)

Having an empty `@param` is still pointless, but it’s better than the Eclipse way.

My personal preference is just to have no javadoc on methods that don’t deserve it (especially if the dev isn’t going to write anything).

So, I don’t like if our codacy check complains about the “pointless” option but allows the “worst case” option. 🙂
