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

Make stateless BSFormatter functions static and remove dead code #3239

Merged

Conversation

bodymindarts
Copy link

Making these functions static is a preparation for extraction.

Reducing the public interface of the BSFormatter instances reduces coupling and enables moving these functions to places where it makes more sense for them to live.

@christophsturm
Copy link
Contributor

I think this pr is too small :)

making the method static is only useful if you really move the method. so to see if it makes sense the move needs to be in the same pr.
While its important to keep prs small, they need to be self contained and make sense on their own.

@bodymindarts
Copy link
Author

bodymindarts commented Sep 11, 2019

making the method static is only useful if you really move the method. so to see if it makes sense the move needs to be in the same pr.

I disagree. Reducing the public api of the BSFormatter instance is useful in itself as it makes it possible to see in the calling code if there is a dependency on hidden state or the function is stateless.

Also removing dead code (there are a couple functions deleted that were never called) is also useful in itself, without a further commit required.

Either way I will open another PR with the first move included.

Copy link
Member

@freimair freimair left a comment

Choose a reason for hiding this comment

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

thanks for splitting that up. yet, I found another LOC I need you to change.

Other than that, I agree with both of you.

  • christoph: the full advantages will only show once alle BSFormatter-Stuff is gone from the constructors. agreed.
  • bodymindarts: reducing the API is useful as well as removing dead code. agreed.

nothing is perfect.

please refer the followup PR to this one and we are good.

.idea/codeStyles/codeStyleConfig.xml Outdated Show resolved Hide resolved
Making these functions static is a preparation for extraction.
Copy link
Member

@freimair freimair left a comment

Choose a reason for hiding this comment

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

Ack.

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