Skip to content

Added BooleanFormat option#51

Merged
MatteoDelOmbra merged 1 commit into
mainfrom
FSPES-61
Jan 28, 2026
Merged

Added BooleanFormat option#51
MatteoDelOmbra merged 1 commit into
mainfrom
FSPES-61

Conversation

@MichalFrends1
Copy link
Copy Markdown
Contributor

@MichalFrends1 MichalFrends1 commented Jan 27, 2026

Please review my changes :)

Review Checklist

  • Task version updated (x.x.0)
  • CHANGELOG.md updated
  • Solution builds
  • Warnings resolved (if possible)
  • Typos resolved
  • Tests cover new code
  • Description how to run tests locally added to README.md (if needed)
  • All tests pass locall

Summary by CodeRabbit

  • New Features

    • Added a BooleanFormat option to customize boolean value representation in CSV files. Users can now choose from lowercase ("true"/"false"), PascalCase ("True"/"False"), or numeric ("1"/"0") formats.
  • Tests

    • Extended test coverage to verify boolean formatting works correctly across all supported input types (JSON, List, XML).

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 27, 2026

Walkthrough

This PR introduces a new BooleanFormat feature allowing customizable boolean output formatting in CSV generation. It adds a BooleanFormat enum with three options (Lowercase, PascalCase, Numeric), integrates the feature across JSON, List, and XML parsers, adds corresponding unit tests, and bumps the package version from 1.10.0 to 1.11.0.

Changes

Cohort / File(s) Summary
Enum & Configuration Additions
Frends.CSV.Create/Definitions/Enums.cs, Frends.CSV.Create/Definitions/Options.cs
New BooleanFormat public enum with three formatting options (Lowercase, PascalCase, Numeric); new BooleanFormat property added to Options class with Lowercase as default.
Parser Integration
Frends.CSV.Create/Parsers/JsonParser.cs, Frends.CSV.Create/Parsers/ListParser.cs, Frends.CSV.Create/Parsers/XmlParser.cs
Boolean values now formatted via helper method using configured BooleanFormat across all three input type parsers; method signatures updated to pass Options object instead of individual string parameter.
Helper Utility
Frends.CSV.Create/Helpers.cs
New internal Helpers class with FormatBoolean() method implementing switch expression logic to convert boolean values according to the specified BooleanFormat.
Unit Tests
Frends.CSV.Create.UnitTests/UnitTests.cs
Three new parameterized test methods (CreateTest_BooleanFormat_FromJSON, CreateTest_BooleanFormat_FromList, CreateTest_BooleanFormat_FromXML) verify boolean formatting across all three input types with DataRow iterations for each format option.
Metadata & Cleanup
Frends.CSV.Create/CHANGELOG.md, Frends.CSV.Create/Frends.CSV.Create.csproj, Frends.CSV.Create/Create.cs, Frends.CSV.Create/Definitions/Input.cs
Version bumped to 1.11.0; changelog entry added documenting new BooleanFormat feature; trailing whitespace removed from Create.cs and Input.cs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Fspw 616 #42 — Modifies the same parsers (JsonParser, ListParser, XmlParser) and unit tests; the main PR builds upon this by adding BooleanFormat handling on top of the parser implementations.

Suggested reviewers

  • jefim

Poem

🐰 Booleans now dress in three stylish ways,
Lowercase, Pascal, or numeric displays,
Through JSON and Lists, XML too,
Our fuzzy formatter makes values shine anew! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a new BooleanFormat option to customize boolean output format in CSV.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Frends.CSV.Create/Frends.CSV.Create/Frends.CSV.Create.csproj (1)

3-16: Csproj is compliant, but Result class lacks Error property required by FT0011 validation.

The .csproj file meets all coding guidelines: targets .NET 6, uses MIT license, and includes all required metadata fields (Version, Authors, Description, RepositoryUrl, GenerateDocumentationFile). The version bump to 1.11.0 is appropriate.

The pipeline failure FT0011: Task return type missing required properties is valid. The Result class in Frends.CSV.Create/Definitions/Result.cs has the required Success property but is missing the Error property (which should contain Message and AdditionalInfo for error handling). Add this property to resolve the validation failure.

🤖 Fix all issues with AI agents
In `@Frends.CSV.Create/Frends.CSV.Create/Definitions/Options.cs`:
- Around line 41-46: Add the two required properties to the Options class:
define a Boolean ThrowErrorOnFailure { get; set; } and a string
ErrorMessageOnFailure { get; set; } (include XML doc comments and a DefaultValue
attribute for each) so the task framework can find them; place them alongside
the existing properties (e.g., next to BooleanFormat) and choose sensible
defaults via DefaultValue (e.g., false for ThrowErrorOnFailure or whatever your
framework expects) to satisfy CI.

Comment thread Frends.CSV.Create/Frends.CSV.Create/Definitions/Options.cs
@MatteoDelOmbra MatteoDelOmbra merged commit aa32151 into main Jan 28, 2026
6 checks passed
@MatteoDelOmbra MatteoDelOmbra deleted the FSPES-61 branch January 28, 2026 13:48
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