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

Is there a formatter ? #100

Closed
sbernard31 opened this issue Jul 20, 2023 · 5 comments · Fixed by #102
Closed

Is there a formatter ? #100

sbernard31 opened this issue Jul 20, 2023 · 5 comments · Fixed by #102
Assignees
Milestone

Comments

@sbernard31
Copy link

Is there a formatter or any other way to have a consistent formatting (at least for indentation) ?
I didn't find anything about that.

@sbernard31
Copy link
Author

A possible fallback is to use Groovy Editor : groovy/groovy-eclipse#437

But there is a drawback : groovy/groovy-eclipse#1495 ...

Ideally this kind of formatter feature should be directly integrated in JenkinsEditor (and should not reuse Java properties for space/tab indentation)

@de-jcup
Copy link
Owner

de-jcup commented Jul 31, 2023

Hello @sbernard31 ,

thank you for the information.

The groovy editor is a standalone plugin which is not connected to the jenkins editor. The jenkins editor is complete standalone - it would not be easy to integrate an external editor part inside jenkins editor, also I would not want to have here any dependency to another product (where I do not know if it would be further developed, would have some drawbacks, hosting/download problems etc.)

So it is no option to integrate the groovy-eclipse parts for the jenkins editor (of course you can use the groovy-editor to edit jenkins files as well!)

When it is only about formatting a declarative jenkins file, there could be possibilities to implement a formatting here, becauses parsing is already (a little bit ) implemented and could be done (explicit for declarative jenkins files).
But I am not sure if this would help you.

Unfortunately I have much time pressure at the moment and no free time for plugin development. As mentioned before, for declarative Jenkins file formatting I think it could be done and if this helps you, I could try to implement it, but I cannot say when I have enough free time to implement - sorry.

@sbernard31
Copy link
Author

The jenkins editor is complete standalone - it would not be easy to integrate an external editor part inside jenkins editor, also I would not want to have here any dependency to another product (where I do not know if it would be further developed, would have some drawbacks, hosting/download problems etc.)

Makes sense.

(of course you can use the groovy-editor to edit jenkins files as well!)

It's still an option but it seems a bit overkill. My project contains only declarative jenkins files.

Unfortunately I have much time pressure at the moment and no free time for plugin development. As mentioned before, for declarative Jenkins file formatting I think it could be done and if this helps you, I could try to implement it, but I cannot say when I have enough free time to implement - sorry.

I understand, I feel this could be a very useful feature. That's the first thing I try to do just after installing eclipse-jenkins-editor
But I think this will not be a so easy feature. Especially when you want to propose good formatting setting.

If you implement this feature let me know and thanks for your work on eclipse-jenkins-editor 🙏

@wicketr
Copy link

wicketr commented Aug 20, 2024

Any type of indentation formatting would be appreciated! Thanks.

de-jcup added a commit that referenced this issue Oct 11, 2024
de-jcup added a commit that referenced this issue Oct 11, 2024
@de-jcup de-jcup added this to the 1.11.0 milestone Oct 11, 2024
@de-jcup de-jcup self-assigned this Oct 11, 2024
@de-jcup
Copy link
Owner

de-jcup commented Oct 11, 2024

@sbernard31 , @wicketr :
I just released v1.11.0 on eclipse marketplace which contains the simple formatter. Hope this is useful.

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 a pull request may close this issue.

3 participants