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

Apply formatting and remove more trace statements #209

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

MrDOS
Copy link
Contributor

@MrDOS MrDOS commented Jan 24, 2021

This PR applies formatting (via Spotless) to the Java source code using the Eclipse JDT default formatting. Now that I see the magnitude of the changeset, I think I'm going to make some tweaks to the formatting rules to try to minimize the changes. Placing opening braces on a new line and not rewrapping lines which are already shorter than the line length limit would drastically cut down on the number of changes, I think, and it turns out I do care more than I thought I did about the wrapping of multiple arguments. I don't like the way it wraps only some of the arguments:

- something = foo(one, two, three);
+ something = foo(one, two,
 	three);

or worse, rewraps only a few of the arguments onto the first line, and leaves the rest hanging:

- something = foo(one,
- 	two,
- 	three);
+ something = foo(one, two,
 	three);

I did also try applying the Eclipse CDT formatter to the C source, and was pretty disappointed with the results. Again, mostly over unnecessary re-wrapping of lines.

@MrDOS MrDOS requested a review from fwolter January 24, 2021 17:04
Copy link
Collaborator

@fwolter fwolter left a comment

Choose a reason for hiding this comment

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

LGTM, checked the removal of the trace logging. That's a real bunch...

I'm fine with your formatting proposals.

Comment on lines 3463 to 3464
sprintf( msg, "readByte return(%i)\n", bytes ? buffer[ 0 ] : -1 );
report( msg );
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think these sprintf loggings could be removed, too. But one step after another.

@@ -5227,9 +5016,7 @@ int send_event( struct event_info_struct *eis, jint type, int flag )
(*eis->env)->ExceptionDescribe(eis->env);
(*eis->env)->ExceptionClear(eis->env);
}
#endif /* asdf */
Copy link
Collaborator

Choose a reason for hiding this comment

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

qwerty :)

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.

2 participants