Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Aug 25, 2025

Updated the cloudfoundry-resources module to comply with all recommendations in docs/style-guide.md. Made minimal, targeted changes to ensure style guide compliance while maintaining existing functionality.

Changes Made

Static Imports: Added static imports for commonly used methods and constants as recommended by the style guide:

  • AttributeKey.stringKey for cleaner attribute key creation
  • Assertions.* and Collectors.joining in test files for better readability

Class Declarations: Made public non-internal classes final as required:

  • CloudFoundryResourceProvider is now final
  • CloudFoundryResourceDetector is now final

AutoService Integration: Replaced manual service registration with @AutoService annotations:

  • Added @AutoService(ResourceProvider.class) to CloudFoundryResourceProvider
  • Added @AutoService(ComponentProvider.class) to CloudFoundryResourceDetector
  • Added required AutoService dependencies to build.gradle.kts
  • Removed manual META-INF/services/ files (now auto-generated)

All tests pass and the module builds successfully. The AutoService annotations automatically generate the correct service registration files at compile time, eliminating the need for manual maintenance of these files.

Fixes #375.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Add static imports for AttributeKey.stringKey, Assertions.*, and Collectors.joining
- Make public classes CloudFoundryResourceProvider and CloudFoundryResourceDetector final
- Add @autoservice annotations to SPI implementations
- Add AutoService dependencies to build.gradle.kts
- Remove manual META-INF/services files (replaced by AutoService)
- All tests pass and code formatting is compliant

Co-authored-by: trask <[email protected]>
@Copilot Copilot AI changed the title [WIP] Update cloudfoundry-resources module to follow style guide Update cloudfoundry-resources module to follow style guide Aug 25, 2025
@Copilot Copilot AI requested a review from trask August 25, 2025 01:07
Copilot finished work on behalf of trask August 25, 2025 01:07
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.

Update cloudfoundry-resources module to follow style guide
2 participants