Skip to content

Enable spotless index#1860

Open
snuyanzin wants to merge 2 commits into
datafaker-net:mainfrom
snuyanzin:spotless
Open

Enable spotless index#1860
snuyanzin wants to merge 2 commits into
datafaker-net:mainfrom
snuyanzin:spotless

Conversation

@snuyanzin

@snuyanzin snuyanzin commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

@codecov-commenter

codecov-commenter commented Jun 27, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.51%. Comparing base (db65b75) to head (85c6fff).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1860      +/-   ##
============================================
- Coverage     92.58%   92.51%   -0.08%     
+ Complexity     3565     3562       -3     
============================================
  Files           346      346              
  Lines          7050     7050              
  Branches        684      684              
============================================
- Hits           6527     6522       -5     
- Misses          363      365       +2     
- Partials        160      163       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asolntsev

Copy link
Copy Markdown
Collaborator

@snuyanzin Do understand correctly that it will help during local development, but would not be used in GitHub Actions?
Maybe we want to share the index between GitHub Actions builds as well?

@asolntsev asolntsev added this to the 3.0.0 milestone Jun 27, 2026
@asolntsev asolntsev added the enhancement New feature or request label Jun 27, 2026
@snuyanzin

Copy link
Copy Markdown
Collaborator Author

yes, it is for local only

my current fear about ci: I don't know how to review it since it will appear in every PR after that

@asolntsev

Copy link
Copy Markdown
Collaborator

We can create a separate branch like "main2" with the shared index, and create few PRs to "main2".
And we'll see how it works.

But this is optional, of course.
Improving the local development is already a step forward.

@snuyanzin

Copy link
Copy Markdown
Collaborator Author

looks like spotless.ratchFrom can do for ci what we need

    <ratchetFrom>origin/main</ratchetFrom>

https://github.com/diffplug/spotless/tree/main/plugin-maven#ratchet

Comment on lines +41 to +50
- name: Determine Spotless ratchet ref
shell: bash
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
ref="${{ github.event.pull_request.base.sha }}"
else
ref="${{ github.event.before }}"
[ "$ref" = "0000000000000000000000000000000000000000" ] && ref=""
fi
[ -n "$ref" ] && echo "RATCHET=-DratchetFrom=$ref" >> "$GITHUB_ENV"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

to make generic in case of multiple branches

@snuyanzin

Copy link
Copy Markdown
Collaborator Author

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants