Skip to content

Conversation

Copy link

Copilot AI commented Jul 19, 2025

This PR syncs the spotless configuration in ai.spotless-conventions.gradle.kts with the upstream configuration from opentelemetry-java-instrumentation.

Changes Made

Core Configuration Updates

  • Added toggleOffOn() to Java configuration for better IDE integration with spotless formatting
  • Enhanced kotlinGradle configuration with additional ktlint rules:
    • ktlint_standard_property-naming disabled (for variable names like v1_10Deps)
    • ktlint_standard_function-literal disabled (prevents moving comments to next line)

Conditional Plugin Support

Added plugin-based conditional support that only activates when the respective plugins are present:

  • Groovy support: License header + endWithNewline()
  • Scala support: scalafmt() + license header for .scala files
  • Kotlin support: ktlint() + license header for .kt files

Improved Performance & Patterns

  • Updated misc format patterns to use broader glob patterns:
    • Added .gitignore and **/*.dockerfile support
    • Changed from restrictive paths to **/*.md and **/gradle.properties
  • Added root project dependency predeclaration for better performance with high concurrency builds

Formatting Fixes Applied

The updated configuration automatically fixed trailing whitespace issues in:

  • .github/copilot-instructions.md
  • licenses/more-licenses.md

Verification

  • ✅ All spotless checks pass
  • ✅ Build compiles successfully
  • ✅ Conditional plugin support works correctly (only activates when plugins are present)
  • ✅ No breaking changes to existing functionality

This brings the spotless configuration in line with the upstream OpenTelemetry project, making it easier to maintain consistency and apply future upstream changes.

Fixes #94.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: trask <218610+trask@users.noreply.github.com>
Copilot AI changed the title [WIP] Sync spotless configuration with opentelemetry-java-instrumentation Sync spotless configuration with opentelemetry-java-instrumentation Jul 19, 2025
Copilot AI requested a review from trask July 19, 2025 17:34
Copilot finished work on behalf of trask July 19, 2025 17:34
@trask trask marked this pull request as ready for review July 19, 2025 17:50
@trask trask merged commit cb61ced into main Jul 19, 2025
trask added a commit that referenced this pull request Jul 21, 2025
)

* Initial plan

* Sync spotless configuration with opentelemetry-java-instrumentation

Co-authored-by: trask <218610+trask@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: trask <218610+trask@users.noreply.github.com>
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.

Sync spotless configuration with opentelemetry-java-instrumentation

2 participants