Skip to content

#862 Exclude custom option namespaces from redundant option validation. - #864

Merged
yruslan merged 1 commit into
masterfrom
feature/862-ignore-custom-keys-in-pedantic-mode
Jul 28, 2026
Merged

#862 Exclude custom option namespaces from redundant option validation.#864
yruslan merged 1 commit into
masterfrom
feature/862-ignore-custom-keys-in-pedantic-mode

Conversation

@yruslan

@yruslan yruslan commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Closes #862

Summary by CodeRabbit

  • Bug Fixes

    • Improved option validation to accept custom and namespace-prefixed settings without incorrectly flagging them as unrecognized.
    • Prevented pedantic mode from failing when valid custom option keys are provided.
  • Tests

    • Added regression coverage for custom, HIDAM, DB2, and underscore-prefixed options.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 24fc4f6a-080d-4604-a87a-0b54f790b415

📥 Commits

Reviewing files that changed from the base of the PR and between c35eeb1 and 16d5ab1.

📒 Files selected for processing (3)
  • cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/parser/CopybookParser.scala
  • cobol-parser/src/main/scala/za/co/absa/cobrix/cobol/reader/parameters/CobolParametersParser.scala
  • spark-cobol/src/test/scala/za/co/absa/cobrix/spark/cobol/CobolSchemaSpec.scala

Walkthrough

Pedantic option validation now permits custom and namespace-prefixed options, with a regression test covering schema creation. A copybook parser comment typo is also corrected.

Changes

Custom option validation

Layer / File(s) Summary
Custom namespace filtering
cobol-parser/.../CobolParametersParser.scala
Unused options beginning with custom, hidam_, db2_, or _ are excluded from unrecognized-option reporting.
Pedantic regression test
spark-cobol/src/test/.../CobolSchemaSpec.scala
Adds coverage confirming custom namespace options do not cause pedantic schema parsing to fail.

Parser comment correction

Layer / File(s) Summary
Transformer comment correction
cobol-parser/src/main/.../CopybookParser.scala
Corrects a typo in a parseTree transformer pipeline comment.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit checked the options with care,
Let custom keys hop freely there.
Pedantic rules now know the way,
While parser typos fade away.
Thump, thump—clean code wins the day!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The added hidam_ and db2_ exclusions go beyond the linked issue's requested custom* and _* namespaces. Limit the ignore list to the namespaces required by #862, or document why hidam_ and db2_ must also be excluded.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: excluding custom option namespaces from redundant option validation.
Linked Issues check ✅ Passed The PR satisfies issue #862 by letting pedantic mode ignore custom and underscore-prefixed options during redundant-option validation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/862-ignore-custom-keys-in-pedantic-mode

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

JaCoCo code coverage report - 'cobol-parser'

Overall Project 90.13% 🍏
File Coverage
CopybookParser.scala 84.32% 🍏

@github-actions

Copy link
Copy Markdown

JaCoCo code coverage report - 'spark-cobol'

Overall Project 83.52% 🍏

There is no coverage information present for the Files changed

@yruslan
yruslan merged commit 6dc6e20 into master Jul 28, 2026
7 checks passed
@yruslan
yruslan deleted the feature/862-ignore-custom-keys-in-pedantic-mode branch July 28, 2026 13:10
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.

When 'pedantic' mode is on custom options can still be passed

1 participant