Skip to content

Add dedicated IDE templates for Spring Integration Framework Code Style #3686

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

Closed
xak2000 opened this issue Dec 7, 2021 · 2 comments
Closed

Comments

@xak2000
Copy link
Contributor

xak2000 commented Dec 7, 2021

And they are different. Is this intended?

Maybe this is not a problem in itself, but the same document suggests:

Some code conventions you can pick up for your IDE from the Spring Framework templates: InteglliJ IDEA or Eclipse.

I tried to import the template into InteglliJ IDEA and found out that imports are really in different order. For example static imports are last according to this commit (and it looks like this is right for Spring Framework Code Style, but wrong for Spring Integration Framework Code Style).

Maybe it's worth to add dedicated templates for IDEs with Spring Integration Framework Code Style? Or change the code style to match Spring Framework Code Style, I don't know.

@xak2000 xak2000 added status: waiting-for-triage The issue need to be evaluated and its future decided type: enhancement labels Dec 7, 2021
@artembilan artembilan added in: build and removed status: waiting-for-triage The issue need to be evaluated and its future decided labels Dec 7, 2021
@artembilan artembilan added this to the 6.0.x milestone Dec 7, 2021
@artembilan
Copy link
Member

Thank you for bringing this again, @xak2000 !

I think it really a time for the current new major release to revise our code style with Spring Framework and Spring Boot style.
I can't recall right now when, but Spring Framework had changed its imports order many years ago and there was no any template back in those days yet.
So we left with our own style just because we really don't cross with Spring Framework & Spring Boot development too much.

But I understand your concern as end-user contributor you really don't care what Spring project you are opening: they have to look alike.

I don't mind to change the import order in the next 6.0 version and really rely on the IDE template from Spring Framework.
Then we would need to change the Checkstyle rule for imports.
And looks like IDEA has now option to Optimize Imports for the whole project 😄 :

image

So, stay tuned or feel free to try to fix it on the 6.0-WIP branch!

@xak2000
Copy link
Contributor Author

xak2000 commented Dec 8, 2021

Thanks, @artembilan !

I just want to clarify why I raised this topic.

But I understand your concern as end-user contributor you really don't care what Spring project you are opening: they have to look alike.

The primary concern is not about the fact that I'm, as an end-user contributor, don't care what Spring project I'm opening. It's ofc also true to some degree 😄. But not much, as IDE could remember Style config for each project separately.

The real concern is that to start contributing you need to carefully read full style guide and configure the IDE manually or try to rearrange imports manually, ignoring the order that IDE puts them in, and removing your dirty hands from CTRL-ALT-O. And I speak only about imports. I didn't check what else is different to be honest.

Importing a prepared IDE config is much more simple and fast for new contributors.

Also because Spring Integration Contribution guide recommends importing Spring Framework's IDE configs, some people could just import and think that it's done. But nope. After importing they need to configure some more options according to style guide.

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

No branches or pull requests

2 participants