Skip to content

Codestyle

backups requested to merge github/fork/chenejac/codestyle into main

Created by: chenejac

VIVO GitHub issue: 3814

Linked Vitro PR

What does this pull request do?

Adding code style into the VIVO/Vitro project

What's new?

checkstyle.xml added into the Vitro root checkstyle-suppression.xml added in the Vitro root (empty at the moment) A wiki page added - https://wiki.lyrasis.org/display/VIVO/Code+Style+Guide checkstyle.xml file linked in pom.xml file (at the moment configured to be skipped)

How should this be tested?

Just for reviewing purposes there is commit with code formatted by using this code style at https://github.com/chenejac/VIVO/commit/863801995c1bcc9ed6685047d17db1c3e88f16e1 Checking style is turned off by definition of suppressions at the level of a Java file:

  1. cd VIVO
  2. mvn checkstyle:checkstyle
  3. No code style violations reported
  4. open checkstyle_suppressions.xml and delete line 6 <suppress files="src[\\/]main[\\/]java[\\/]edu[\\/]cornell[\\/]mannlib[\\/]semservices[\\/]service[\\/]impl[\\/]AgrovocService\.java" checks="."/>
  5. mvn checkstyle:checkstyle
  6. Hundreds of code style violations reported

Interested parties

Tag (@ mention) interested parties or, if unsure, @VIVO-project/vivo-committers

Merge request reports