Skip to content

Add gitignore and automatic code formatting#71

Merged
lfoppiano merged 10 commits into
mainfrom
chore/add-spotless
Jun 16, 2026
Merged

Add gitignore and automatic code formatting#71
lfoppiano merged 10 commits into
mainfrom
chore/add-spotless

Conversation

@lfoppiano

Copy link
Copy Markdown
Contributor

Hi all,
I did some cleanups and added the Spotless pluging with the CI.
I noticed there was a class with weird / missing indentation and that the .gitignore was missing so I took the opportunity to do so.
Now the CI will fail enforcing formatting. This would work well if we squash/merge and disable the commits directly on main.

Note: I did use a spotless configuration more of my preference, but I have not problems to adapt that to what maintainers require.

@lfoppiano lfoppiano changed the title Chores and add spoless for automatic code formatting Add gitignore and spoless for automatic code formatting Apr 21, 2026
@lfoppiano lfoppiano force-pushed the chore/add-spotless branch from 7f2651a to 756e0ac Compare April 21, 2026 14:36

@sebastian-nagel sebastian-nagel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, @lfoppiano. Looks good.

However, a principal question is whether we shouldn't instead follow the upstream code formatting rules? StormCrawler uses the Cosium formatter and Git pre-commit hooks, see the Note for Developers in the README. Using the same formatting rules might help to keep the code in sync. Some classes in news crawler are borrowed from StormCrawler.

@lfoppiano

Copy link
Copy Markdown
Contributor Author

@sebastian-nagel good point. I've removed spotless and implemented Cosium. It's worth the effort to match the storm-crawler now so that we won't have problems with code diffs.

@sebastian-nagel sebastian-nagel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, @lfoppiano. Looks good, except for the license headers - see the inline comment.

+1 to stash and merge once the headers are fixed.

Comment thread src/main/java/org/commoncrawl/stormcrawler/filter/FastURLFilter.java Outdated
@sebastian-nagel sebastian-nagel changed the title Add gitignore and spoless for automatic code formatting Add gitignore and automatic code formatting Jun 16, 2026
@lfoppiano lfoppiano force-pushed the chore/add-spotless branch from b0aa0dc to 3d13c25 Compare June 16, 2026 17:30
@lfoppiano lfoppiano merged commit e6e4d74 into main Jun 16, 2026
3 checks passed
@lfoppiano lfoppiano deleted the chore/add-spotless branch June 16, 2026 17:37
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.

2 participants