Skip to content

feat: added extension 'Spotless Gradle', configured so it runs spotlessApply - Xavier Cruz #436

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

Conversation

XavierCruz5106
Copy link
Contributor

@XavierCruz5106 XavierCruz5106 commented Oct 24, 2024

Credits to David Smith for showing me the extension and telling me of this extra credit. Credits also to Joseph and Pablo

Fixes #421

@@ -15,4 +15,12 @@
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[java]": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not working when I test locally. Did you test this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have tested it, it worked locally. Maybe something in the configuration is messed up? I'll check this out tmr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

after some further digging it looks like the activation events for this plugin are
workspaceContains:gradlew
workspaceContains:gradlew.bat

and since gradle is inside of the children folders and not the parent workspace i dont think it will work. Ill make a new repo and test this out

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup that was the issue. It works as intended in the new repository, even lints when something is not spotless

Screenshot 2024-10-25 at 1 03 35 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is another extension which is more bare bones thats called Run On Save. the only issue im facing currently is how to determine where the java project was created at.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice. I was proud to see your feature request in the plugin repo when I walked the TAs through the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you!

@XavierCruz5106
Copy link
Contributor Author

Lmk if you want me to clean up the commits. I could revert this whole branch and just add the extension to the devcontainer and commit the one liner

@anthonydmays
Copy link
Contributor

Lmk if you want me to clean up the commits. I could revert this whole branch and just add the extension to the devcontainer and commit the one liner

Yeah, I think you need to do that. I can't see what changes you made

@XavierCruz5106 XavierCruz5106 deleted the feature/spotless branch October 28, 2024 19:05
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.

Feature Request: Add auto-formatting for Java
2 participants