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

Correct checkstyle fixes (except TODOs) #54

Closed
wants to merge 3 commits into from

Conversation

cgamble2
Copy link

Fixed the formatting in ImgProvider.java and ImageLab.java to fit appropriate amount of characters per string

Slight formatting fix

Fixed all checkstyle issues on ImgProvider.java

Fixed checkstyle errors for three classes

added setter method to ILFrame class

Correct code convention violations in Run.java

  • Fixed checkstyle issues with 'impro' variable in ImageLab.java

  • Removed intellij files

  • Fixed small issue with image provider variable not being set properly in ImgProvider.java

Fixed the formatting in ImgProvider.java and ImageLab.java to fit appropriate amount of characters per string

Slight formatting fix

Fixed all checkstyle issues on ImgProvider.java

Fixed checkstyle errors for three classes

added setter method to ILFrame class

Correct code convention violations in Run.java

* Fixed checkstyle issues with 'impro' variable in ImageLab.java

* Removed intellij files

* Fixed small issue with image provider variable not being set properly in ImgProvider.java
Copy link
Contributor

@jody jody left a comment

Choose a reason for hiding this comment

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

File Changes
M build.gradle (2) Why is build.gradle being changed as part of this PR?
A gf (462) Why is new file gf being added as part of this PR?

@cgamble2
Copy link
Author

Removed a stray space from build.gradle and deleted unnecessary gf file.

@cgamble2 cgamble2 closed this Nov 13, 2020
@jody
Copy link
Contributor

jody commented Nov 14, 2020

Was this closed in order to open a new (clean) PR?

@cgamble2
Copy link
Author

Apologies, I had the wrong assumption about "close" when I published the comment.

@cgamble2 cgamble2 reopened this Nov 14, 2020
public static void main(String[] args) {
public final class Run {
/**
* Default constructor - not used.
Copy link
Contributor

@jody jody Nov 15, 2020

Choose a reason for hiding this comment

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

One you add an explicit constructor, Java no longer creates a "default constructor".
Perhaps a more appropriate comment would be "Hide the default constructor for this utility class."

Comment on lines +34 to +35
* @param args Command-line arguments; passed into the main
* application
Copy link
Contributor

@jody jody Nov 15, 2020

Choose a reason for hiding this comment

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

To be more useful, this comment should answer the question: "What are the command-line arguments to ImageLab?"

@@ -19,7 +19,6 @@
private Image img;
/** The display panel of this frame. */
private DisPanel pane;

Copy link
Contributor

Choose a reason for hiding this comment

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

What is the rationale for removing this whitespace?
Looking at this block of code, it seems like more (rather than less) whitespace might be useful.

Copy link
Contributor

@jody jody left a comment

Choose a reason for hiding this comment

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

As I try to review this, I'm finding the PR too broad and encompasses a breadth of change types, from simple formatting to significant refactoring and associated design decision making.

The original issue (#32), identified as an epic, doesn't appropriately reflect the complexity of the objective. Although there is a single tool that is identifying shortcomings in the source code, Checkstyle, the reported "errors" are not all of the same type, do not require the same degree of design choice, nor do they have the same level of impact on the maintainability of the product.

This PR needs to be broken into smaller unit PRs.

The sub-issues (#33, #34, #35) likewise may each need to be broken down into smaller sub-issues to enable meaningful corrections in shorter time cycles.

I'm leaving in the few comments I'd made already, but they by no means constitute a full review.

Will set this PR to DRAFT with the expectation that it will be CLOSED after further discussion and potential reorganization of the User Stories.

@@ -32,4 +32,13 @@ public void setActive() {
public void byebye() {
improvider.setInactive();
}
/** @return ImgProvider object. */
Copy link
Contributor

Choose a reason for hiding this comment

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

A more meaningful comment would be appreciated. (This just reiterates the syntactic structure of the method.)

Comment on lines +39 to +40
/** Set ImgProvider object.
* @param imp */
Copy link
Contributor

Choose a reason for hiding this comment

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

Incomplete comment. What is the intent of the method? What is the meaning of parameter imp?

@@ -32,4 +32,13 @@ public void setActive() {
public void byebye() {
improvider.setInactive();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Add whitespace to separate methods.

/** @return ImgProvider object. */
protected ImgProvider getImgProvider() {
return improvider;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Add whitespace to separate methods.

* @return current ImageProvider
*/

public static ImgProvider getImpro() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the name "getImpro" because there is another getImageProvider method that this needs to be distinguished from? (If using a shortened method name, it should still use camel-casing to indicate the beginning of each word.)

*
* @param newImpro constructed image provider
*/
public static void setImpro(final ImgProvider newImpro) {
Copy link
Contributor

Choose a reason for hiding this comment

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

See comments regarding getImpro method.

@jody jody marked this pull request as draft November 15, 2020 18:57
@cgamble2
Copy link
Author

Closing this PR to submit a chain of PR's that contain fixes to smaller, individual issues by type and/or class.

@cgamble2 cgamble2 closed this Nov 19, 2020
@jody
Copy link
Contributor

jody commented Nov 19, 2020

@cgamble2 Please close this PR so that it no longer shows up as active.
Looking forward to the new issues and PRs.

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.

3 participants