Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Definition of the code style #3814

Closed
chenejac opened this issue Feb 18, 2023 · 0 comments · Fixed by #3840 or vivo-project/Vitro#372
Closed

Definition of the code style #3814

chenejac opened this issue Feb 18, 2023 · 0 comments · Fixed by #3840 or vivo-project/Vitro#372
Assignees
Labels
Milestone

Comments

@chenejac
Copy link
Contributor

chenejac commented Feb 18, 2023

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 Common license preamble for all Java classes #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

@chenejac chenejac moved this from Needs Triage to Todo in Installation and environment improvements Feb 19, 2023
@chenejac chenejac self-assigned this Feb 22, 2023
This was referenced Feb 24, 2023
@chenejac chenejac changed the title A wiki page for code style Definition of the code style Feb 24, 2023
@chenejac chenejac moved this from Todo to In review in Installation and environment improvements Feb 24, 2023
This was linked to pull requests Feb 28, 2023
@chenejac chenejac moved this from In review to Done in Installation and environment improvements Mar 14, 2023
@chenejac chenejac added this to the v1.15 milestone May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

1 participant