Skip to content

Overhaul Apache RAT#4569

Open
dsmiley wants to merge 1 commit into
apache:mainfrom
dsmiley:rat-overhaul
Open

Overhaul Apache RAT#4569
dsmiley wants to merge 1 commit into
apache:mainfrom
dsmiley:rat-overhaul

Conversation

@dsmiley

@dsmiley dsmiley commented Jun 29, 2026

Copy link
Copy Markdown
Contributor
  • Upgrade from 0.15 to 0.18
  • Use a config file
  • Remove custom license patterns that match nothing anymore
  • Ensure works even without a git working tree (e.g. smoketester source release)
  • Add a canary to assert that header detection is actually working each run
  • Synchronize RatTask executions to avoid shared Ant task state issues under parallel Gradle execution
  • Consolidate all exclude patterns into a single include-everything-then-exclude approach

Note: requires the PR that excludes dev-docs and dot-files from the source release, in order for RAT to pass on smoketest release

* Upgrade from 0.15 to 0.18
* Use a config file
* Remove custom license patterns that match nothing anymore
* Ensure works even without a git working tree (e.g. smoketester source release)
* Add a canary to assert that header detection is actually working each run
* Synchronize RatTask executions to avoid shared Ant task state issues
  under parallel Gradle execution
* Consolidate all exclude patterns into a single include-everything-then-exclude approach
@dsmiley dsmiley requested a review from janhoy June 29, 2026 16:17

@dsmiley dsmiley left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I chickened out and didn't pull out jgit... but was tempted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Instead of tying this to RAT, the needs are too simple/basic to warrant that coupling.

exclude "**/.*" // e.g. .gradle, .github, .junie, .gitignore, etc.
} else {
// Source release (no git): scan everything, exclude generated/ignored paths manually.
include "**"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

key change here, esp. for the source release validation (smoketester). Include all by default.

// TODO: SOLR-15601: Some of these should carry the license, perhaps?
exclude "**/*.html"
exclude subprojects.collect {
projectDir.toPath().relativize(it.projectDir.toPath()).toString().replace('\\', '/')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

was overly simple before, thus would exclude any "core" dir anywhere for example

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant