-
Notifications
You must be signed in to change notification settings - Fork 326
Conversation
I'm struggling to remember the exact name of the tool, but I've seen other OSS repos where they commit their coding standards and IDE formatters to the root of their project. Could this be also useful in addition to the bot |
…playOptions, hideDocs, hideSettings)
…ptions and default behaviour
@setchy Looks like Spring Boot also has folders in the root for I've seen other projects where the default .idea folder with just the code style settings is part of the repo and all other files are ignored. That should automatically apply those code style settings to your project without needing to specifically import them. I could give something like that a try? |
@setchy I've included the A lot of changed files now because of simple formatting changes. |
/** | ||
* @author <a href="mailto:[email protected]">oEmbedler Inc.</a> | ||
*/ | ||
/** @author <a href="mailto:[email protected]">oEmbedler Inc.</a> */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice email address :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤣
@@ -179,30 +195,32 @@ private void setQueryResolverClass( | |||
* This is required, because normally implementations of interfaces are not explicitly returned by | |||
* any resolver method, and therefor not added to the schema automatically. | |||
* | |||
* All interfaces are considered GraphQL interfaces if they are declared in the configured package | |||
* and have at least one {@link GraphQLField}-annotated methods. | |||
* <p>All interfaces are considered GraphQL interfaces if they are declared in the configured |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the closing tag missing intentionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The google-java-format plugin made this change automatically actually when I ran ./gradlew googleJavaFormat
. So it seems to have been coded this way intentionally by Google.
…atest Voyager configuration options
…verify-google-code-format # Conflicts: # voyager-spring-boot-autoconfigure/src/main/java/graphql/kickstart/voyager/boot/VoyagerIndexHtmlTemplate.java
Looks like I'm not able to get IntelliJ to play completely nice with that gradle plug-in. Which is very annoying, because now I have to run that gradle task every time to correct it instead of being able to rely on IntelliJ reformatting it the same way. Not sure if this is really the way to go then... 🤔 |
Damn! I haven't used this myself, but found it yesterday - https://github.com/jhipster/prettier-java - might be worth a look (no gradle plugin by the look though) I'll do some further research to see if I can remember the library I forgot :p |
Thanks, I'll check it out. I'll also try to see if there's one common configuration to achieve using checkstyle. |
What about a combination of https://github.com/google/google-java-format (IntelliJ or Eclipse plugin) with https://github.com/diffplug/spotless/tree/main/plugin-gradle#google-java-format for maven / gradle plugins |
Yeah that could work! The gradle plugin is already what this PR is using now. So that would mean that we'd have to add a section in the contributions doc explaining to install that plugin for your IDE too to make it all work. Haven't checked it out how that plugin works in the IDE. |
I just tested it in IntelliJ. Installed plugin, restart IDE, enable it per project (very nice) then Command+Option+L to reformat. It mentions the plugin doesn't handle organizing imports. To do that you need to set the File->Settings->Editor->Code Style. This might be where we use a Project specific file standard that we commit to git |
I noticed the contributing.md mentions spectrum. I can update the wording tomorrow if no one beats me to it UPDATE: reference removed |
…ould notify users that this plugin is required
SonarCloud Quality Gate failed. |
Added plugin to verify google code format and updated the Contributions file explaining how to fix code formatting if the build fails because of the check.
It's as simple as running: