Skip to content

Conversation

@Pankraz76
Copy link

@Pankraz76 Pankraz76 commented Jan 5, 2025

Convention over configuration -> auto config over manual config:

Next, disable wildcard imports:
navigate to Editor -> Code Style -> Java -> Imports
and set Class count to use import with '*' to 999. Do the same with Names count to use static import with '*'.

https://stackoverflow.com/a/67844641/3388213

enforce with plugin: https://github.com/ec4j/editorconfig-maven-plugin

with * import

[ERROR] Failed to execute goal org.ec4j.maven:editorconfig-maven-plugin:0.1.3:check (default-cli) on project quarkus-development-mode-spi: 
[ERROR] 
[ERROR] There are .editorconfig violations. You may want to run
[ERROR] 
[ERROR]     mvn editorconfig:format
[ERROR] 
[ERROR] to fix them automagically.
[ERROR] 
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Process finished with exit code 1

without *

[INFO] --- formatter:2.24.1:validate (default-cli) @ quarkus-junit4-mock ---
[INFO] Processed 4 files in 19ms (Formatted: 0, Skipped: 4, Unchanged: 0, Failed: 0, Readonly: 0)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Quarkus - Core 999-SNAPSHOT:
[INFO] 
[INFO] Quarkus - Development mode - SPI ................... SUCCESS [  0.716 s]
[INFO] Quarkus - Core - Class Change Agent ................ SUCCESS [  0.027 s]
[INFO] Quarkus - IDE Launcher ............................. SUCCESS [  0.086 s]
[INFO] Quarkus - Builder .................................. SUCCESS [  0.608 s]
[INFO] Quarkus - Core ..................................... SUCCESS [  0.006 s]
[INFO] Quarkus - Core - Extension Processor ............... SUCCESS [  0.167 s]
[INFO] Quarkus - Core - Runtime ........................... SUCCESS [  0.580 s]
[INFO] Quarkus - Core - Deployment ........................ SUCCESS [  0.830 s]
[INFO] Quarkus - JUnit 4 Mock ............................. SUCCESS [  0.026 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  4.400 s
[INFO] Finished at: 2025-01-16T15:49:03+01:00
[INFO] ------------------------------------------------------------------------
[INFO] 9 goals, 9 executed

Next, disable wildcard imports: navigate to Editor -> Code Style -> Java -> Imports and set Class count to use import with '*' to 999. Do the same with Names count to use static import with '*'.
@quarkus-bot
Copy link

quarkus-bot bot commented Jan 5, 2025

Thanks for your pull request!

Your pull request does not follow our editorial rules. Could you have a look?

  • description should not be empty, describe your intent or provide links to the issues this PR is fixing (using Fixes #NNNNN) or changelogs

This message is automatically generated by a bot.

@Pankraz76 Pankraz76 mentioned this pull request Jan 7, 2025
@Pankraz76 Pankraz76 changed the title Add editorconfig Add editorconfig to set Class count to use import with '*' to 999. Do the same with Names count to use static import with '*'. Jan 8, 2025
@Pankraz76
Copy link
Author

@geoand is this helpful to avoid the manual interaction?

@Pankraz76 Pankraz76 changed the title Add editorconfig to set Class count to use import with '*' to 999. Do the same with Names count to use static import with '*'. cjhore: IntelliJ: Never use wildcard imports Jan 14, 2025
@Pankraz76 Pankraz76 changed the title cjhore: IntelliJ: Never use wildcard imports cjhore: Never use wildcard imports Jan 14, 2025
@Pankraz76 Pankraz76 changed the title cjhore: Never use wildcard imports chore: Never use wildcard imports Jan 14, 2025
ozangunalp and others added 20 commits January 15, 2025 09:40
server properties no longer works with auto-config
This is done because I assume that was the original intent,
but also because it avoids the non-zero cost
incurred by Vert.x to look up the various
supported options
They both have the same result starting with 23.1. Runtime
initialization is public API while rerun is not, and will soon be
deprecated and at some point removed in future releases.

See oracle/graal#5013 (comment)
and oracle/graal#8323
This change does not have any impact in Mandrel/GraalVM for JDK 21 and
later versions, but allows Quarkus to build with Mandrel/GraalVM for JDK
17.
Starting with Mandrel/GraalVM for JDK 21
`RuntimeReinitializedClassBuildItem` is functionally the same with
`RuntimeInitializedClassBuildItem`.
In a traditional blocking and synchronous framework the opentelemetry context
is attached to ThreadLocal. In reactive programming, where multiple processings share the same event-loop thread, one has to use Vert.x duplicated contexts instead (see https://quarkus.io/guides/duplicated-context).
wrapWithSpan ensures that the pipeline is executed on a duplicated context (If the current context already is duplicated, it will stay the same. Therefore, nested calls to wrapWithSpan will all run on the same vert.x context).

inspired by Jan Peremsky (https://github.com/jan-peremsky/quarkus-reactive-otel/blob/c74043d388ec4df155f466f1d6938931c3389b70/src/main/java/com/fng/ewallet/pex/Tracer.java)
and edeandrea (https://github.com/quarkusio/quarkus-super-heroes/blob/main/event-statistics/src/main/java/io/quarkus/sample/superheroes/statistics/listener/SuperStats.java)

suggestions from review

I will squash with the previous commit once everything is approved

suggestion from reviewer

todo: squash when everything is done
-> adapt commit message. In this solution span and scope are local variables. no need for a stack.

unnecessary line removed

fix test to run on different contexts again

cleanup
Add helper methods for manual spans in mutiny pipelines
Bump strimzi-test-container version from 0.107.0 to 0.109.1
Use VertxLogDelegateFactory for internal Vert.x logging
…eads

This is going to be useful once
netty/netty#14155 lands in Quarkus.
…se-vertx-when-possible

OIDC: reuse shared Vert.x instance in DEV and test mode whenever it is possible
…t-with-dev-svc-for-oidc

OIDC: document and use OidcTestClient to get access token from Dev Services for OIDC
Switch to runtime initialization instead of rerun
pinguin3245678 and others added 13 commits January 16, 2025 16:04
Next, disable wildcard imports: navigate to Editor -> Code Style -> Java -> Imports and set Class count to use import with '*' to 999. Do the same with Names count to use static import with '*'.
@quarkus-bot quarkus-bot bot added area/dependencies Pull requests that update a dependency file area/docstyle issues related for manual docstyle review area/documentation area/kafka-streams area/netty area/oidc labels Jan 16, 2025
@github-actions
Copy link

github-actions bot commented Jan 16, 2025

🙈 The PR is closed and the preview is expired.

@Pankraz76
Copy link
Author

#46160
#46149

@Pankraz76 Pankraz76 closed this Feb 9, 2025
@quarkus-bot quarkus-bot bot added the triage/invalid This doesn't seem right label Feb 9, 2025
@Pankraz76
Copy link
Author

this is very interesting for quarkus as the eclipse plugin is already in use:

https://www.baeldung.com/java-maven-spotless-plugin#custom-formatting-rules

image

maven fixes the checkstyle isses with spot out of the box its very nice to have this smart setup.

@Pankraz76
Copy link
Author

let me know if you want to see demo like currently done in check.

@Pankraz76
Copy link
Author

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

Labels

area/amazon-lambda area/arc Issue related to ARC (dependency injection) area/config area/core area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/docstyle issues related for manual docstyle review area/documentation area/funqy area/gradle Gradle area/graphql area/kafka area/kafka-streams area/kubernetes area/maven area/netty area/oidc area/platform Issues related to definition and interaction with Quarkus Platform area/smallrye area/testing area/tracing area/vertx triage/invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants