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

Added Check Style #1546

Merged
merged 5 commits into from
May 29, 2024
Merged

Added Check Style #1546

merged 5 commits into from
May 29, 2024

Conversation

oblodgett
Copy link
Member

@oblodgett oblodgett commented May 28, 2024

This PR add check style which checks the formatting of the code. This will alert to extraneous space in the code or spaces vs tabs, etc. There is 3 major changes (although minor in the grand scheme of things)

  1. Single line blocks will need to be enclosed with curly braces and have proper spacing Shift - Command - F on mac will do this.
  2. Arrays can't end with a trailing comma even though java allows it
  3. Util classes (static classes) have to have a private (hidden) constructor (this is fairly rare in the codebase)

@oblodgett oblodgett force-pushed the add_checkstyle branch 2 times, most recently from 90d441f to cb9d08b Compare May 28, 2024 23:27
@oblodgett oblodgett force-pushed the add_checkstyle branch 2 times, most recently from fb83bc8 to bf43c97 Compare May 29, 2024 00:03
@alliance-genome alliance-genome deleted a comment from mluypaert May 29, 2024
@alliance-genome alliance-genome deleted a comment from mluypaert May 29, 2024
@alliance-genome alliance-genome deleted a comment from mluypaert May 29, 2024
@alliance-genome alliance-genome deleted a comment from mluypaert May 29, 2024
@alliance-genome alliance-genome deleted a comment from mluypaert May 29, 2024
@alliance-genome alliance-genome deleted a comment from mluypaert May 29, 2024
@alliance-genome alliance-genome deleted a comment from mluypaert May 29, 2024
@alliance-genome alliance-genome deleted a comment from mluypaert May 29, 2024
@alliance-genome alliance-genome deleted a comment from mluypaert May 29, 2024
@oblodgett
Copy link
Member Author

@adamgibs this is only for *.java files. I would like to set this up for *.js files but the rules would be different. Maybe we can find an example checkstyle.xml for *.js?

Copy link
Contributor

@abecerra abecerra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add to the README a line explaining how to use it locally before pushing?

@adamgibs
Copy link
Contributor

@oblodgett It looks like checkstyle is specifically for Java. I'm not seeing any examples of using with with JavaScript files.

@oblodgett oblodgett merged commit af3f197 into alpha May 29, 2024
6 checks passed
@oblodgett oblodgett deleted the add_checkstyle branch May 29, 2024 16:02

@Inject
PersonDAO personDAO;
@Inject PersonDAO personDAO;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like to have the annotation on top of the line it's annotating as it is easier to read for me.
Can we not change this?

@IndexedEmbedded(
includePaths = {
"functionalImpacts.name", "phenotypeTerm.curie", "phenotypeTerm.name", "phenotypeStatement", "evidence.curie",
"functionalImpacts.name_keyword", "phenotypeTerm.curie_keyword", "phenotypeTerm.name_keyword", "phenotypeStatement_keyword",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants