vivo-project / VIVO

VIVO is an extensible semantic web application for research discovery and showcasing scholarly work
http://vivoweb.org
BSD 3-Clause "New" or "Revised" License
205 stars 127 forks source link

Definition of the code style #3814

Closed chenejac closed 1 year ago

chenejac commented 1 year ago

Is your feature request related to a problem? Please describe. We need to define a code style for the VIVO/Vitro project

Describe the solution you'd like

  1. no tabs, 4 space for indentations
  2. One true brace style
  3. No wildcards imports (java.util.*)
  4. White space around - https://checkstyle.sourceforge.io/config_whitespace.html#WhitespaceAround
  5. No empty "catch" blocks in try/catch
  6. Each source file must contain the required VIVO license header (see https://github.com/vivo-project/VIVO/issues/3806)
  7. Max line length 100?

A wiki page should be created. There should be also a section for popular IDE (Eclipse, IntelliJ, VSCode). Possibility to download checkstyle.xml which might be loaded into those IDEs.

Additional context See examples for DSpace and Fedora communities https://wiki.lyrasis.org/display/DSPACE/Code+Style+Guide https://wiki.lyrasis.org/display/FF/Code+Style+Guide