-
Notifications
You must be signed in to change notification settings - Fork 53
Bugfix for 429 (Maven sourceDocuments configuration is optional) #431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Auto-populate sourceDocuments from sourceDir when not explicitly configured, matching the behavior of Gradle plugin and CLI. - Add findHtmlFiles() method to recursively scan for .html files - Modify setupConfiguration() to auto-populate when sourceDocuments is null - Add integration test executeWithOnlySourceDir_ShouldSucceed() - All existing tests pass without regression 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Rename defaultIndeFilenames to defaultIndexFilenames 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update Gradle and Maven plugins to automatically search for both .html and .htm files when sourceDocuments is not specified. - Gradle plugin: Add .htm pattern to fileTree includes - Maven plugin: Update findHtmlFiles() to check for .htm extension - Update README.adoc in both plugins to document default behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add tests to verify both .html and .htm files are discovered when sourceDocuments is auto-populated from sourceDir. - Maven plugin: Test verifies 3 files (.htm, .html, nested .htm) - Gradle plugin: Test verifies same file discovery pattern - Both tests confirm recursive directory scanning works for .htm - Fix Maven README: Use correct <sourceDocument> element name - All tests pass with no regressions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Increases test count from 10 to 18 tests to improve SonarCloud coverage for HtmlSanityCheckMojo. - Add tests for HTTP status code overrides (success/error/warning) - Add tests for findHtmlFiles() edge cases (null, non-existent, empty) - Verify non-HTML files are properly ignored - Refactor setField() helper to shared static method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request enhances the HTML Sanity Check Maven and Gradle plugins to automatically discover HTML files (including .htm extension) from the sourceDir when sourceDocuments is not explicitly configured. Key changes include:
- Auto-population of
sourceDocumentsfromsourceDirwhen not specified - Support for both
.htmland.htmfile extensions - Addition of a recursive file discovery mechanism for the Maven plugin
- Comprehensive test coverage for the new functionality
- Fixed a typo in method name (
defaultIndeFilenames→defaultIndexFilenames) - Updated documentation to reflect
.htmsupport
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
HtmlSanityCheckMojo.java |
Added findHtmlFiles() method to recursively discover HTML/HTM files and modified setupConfiguration() to auto-populate sourceDocuments |
HtmlSanityCheckMojoTest.java |
Added comprehensive test suite covering HTTP status code configuration, file discovery scenarios, and edge cases |
HtmlSanityCheckTask.groovy |
Added .htm file pattern to Gradle plugin's auto-population logic |
HtmlSanityCheckTaskSpec.groovy |
Added test to verify .htm files are included in auto-population |
Configuration.java |
Fixed typo in method name from defaultIndeFilenames to defaultIndexFilenames |
htmlSanityCheck-maven-plugin/README.adoc |
Updated documentation to reflect .htm support and corrected XML tag name |
htmlSanityCheck-gradle-plugin/README.adoc |
Updated documentation to reflect .htm support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results123 files ± 0 123 suites ±0 5m 16s ⏱️ - 7m 20s For more details on these failures, see this check. Results for commit 2d1b66c. ± Comparison against base commit 9efca5e. This pull request removes 60 and adds 34 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
b474f66 to
2d1b66c
Compare
|



The Maven source document configuration should be optional (it was mandatory as it seems).
This closes #429