Skip to content
CAI
Software that uses CAICheck a score

brazilian-utils/dotnet

66.5

Adequate · 3 October 2026

4k

lines of production code

F#

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a .NET 8 library, originally written in C\# and now rewritten in F\#, dedicated to validating and formatting Brazilian-specific identifiers and financial data. It provides comprehensive modules for checking documents such as CPF, CNPJ, CNH, and CEP, as well as financial instruments like Boletos and Pix payloads. The codebase includes extensive unit tests to ensure the correctness of these validation algorithms and formatting logic.

Features

BrazilianUtils migrated to F\# with expanded validation modules

The BrazilianUtils library has been rewritten in F\# (replacing the previous C\# implementation), introducing a comprehensive suite of new validation and utility modules. This update adds support for validating and formatting Brazilian Area Codes, Bank codes (COMPE/ISPB), Bank Accounts (including Verhoeff algorithm for Nubank), Boleto lines, CAEPF, CBO, CEI, CEP (with ViaCEP integration), Civil Registry Certificates, CFOP, CNAE, and CNH (2022 format). It also includes a new CNO module and updates the package version to 2.4.0.

BrazilianUtils · high confidence

Architecture

Library migrated from C\# to F\# and updated to .NET 8

The Brazilian Utils library has been rewritten in F\#, replacing the previous C\# implementation. This migration is reflected in the solution file, which now references .fsproj files instead of .csproj, and includes a new .editorconfig for F\# formatting. Additionally, the project target framework has been updated to .NET 8, as noted in the changelog.

(repo-wide) · high confidence

Test coverage

Added unit tests for Brazilian document and utility validation logic

Added comprehensive unit tests across the BrazilianUtils.Tests project for validating Brazilian identifiers and utilities, including Boletos, CEPs, CNHs, CNPJs, CPFs, IEs, Legal Process IDs, License Plates, NFe keys, Phones, PIS, Pix payloads, RENAVAMs, and Voter IDs. The tests cover valid/invalid inputs, formatting, generation, and specific regression fixes for edge cases such as CNPJ digit generation, CNH checksum remainder handling, and Pix payload mutual exclusivity.

BrazilianUtils.Tests · high confidence

Dependencies

Migration from C\# to F\# and upgrade to .NET 8

The BrazilianUtils library and its test suite have been migrated from C\# to F\#, replacing the previous .NET Standard 2.0 and .NET Core 2.1 targets with .NET 8. This change updates the project structure to use .fsproj files, upgrades the test framework dependencies (xunit to 2.9.2, Microsoft.NET.Test.Sdk to 17.11.1), and sets the library version to 2.4.0.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 68 → 67 (-1.1)
  • Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.

Lenses

  • Code Health 93 → 86 (-6.3)
  • Architecture 100 → 100 (-0.0)
  • Maturity 54 → 53 (-0.3)
  • Readiness 64 → 64 (+0.0)
  • Security 100 → 100 (+0.0)

Resolved (5)

  • Currency.convertRealToText (cognitive 34) (BrazilianUtils/Currency.fs)
  • Currency.numberToPortuguese (cognitive 65) (BrazilianUtils/Currency.fs)
  • Currency.numberToPortuguese (cyclomatic 27) (BrazilianUtils/Currency.fs)
  • Documentation: no architecture or design documentation (README.md)
  • Duplicated block (7 lines × 2) (BrazilianUtils/Cnpj.fs)

New (29)

  • BankAccount.IsValid (cognitive 23) (BrazilianUtils/BankAccount.fs)
  • BankAccount.IsValid (cyclomatic 22) (BrazilianUtils/BankAccount.fs)
  • Currency.ConvertToWords (cognitive 31) (BrazilianUtils/Currency.fs)
  • Currency.analisarValorMonetario (cognitive 41) (BrazilianUtils/Currency.fs)
  • Currency.numeroParaPortugues (cognitive 56) (BrazilianUtils/Currency.fs)
  • Currency.numeroParaPortugues (cyclomatic 26) (BrazilianUtils/Currency.fs)
  • Date.DifferenceInBusinessDays (cognitive 17) (BrazilianUtils/Date.fs)
  • Duplicated block (10 lines × 2) (BrazilianUtils/AreaCode.fs)
  • Duplicated block (10 lines × 2) (BrazilianUtils/Phone.fs)
  • Duplicated block (11 lines × 2) (BrazilianUtils/Iban.fs)
  • Duplicated block (11–12 lines × 2) (BrazilianUtils/Currency.fs)
  • Duplicated block (15 lines × 2) (BrazilianUtils/Cei.fs)
  • Duplicated block (23 lines × 2) (BrazilianUtils/Cnae.fs)
  • Duplicated block (38–39 lines × 2) (BrazilianUtils/Currency.fs)
  • Duplicated block (4–9 lines × 3) (BrazilianUtils/Caepf.fs)
  • Duplicated block (5 lines × 3) (BrazilianUtils/Cbo.fs)
  • Duplicated block (6 lines × 3) (BrazilianUtils/Cbo.fs)
  • Duplicated block (7–8 lines × 2) (BrazilianUtils/Cfop.fs)
  • Duplicated block (8 lines × 2) (BrazilianUtils/Caepf.fs)
  • Hotspot: BrazilianUtils/VoterId.fs (BrazilianUtils/VoterId.fs)
  • …and 9 more

Changes since last survey

  • 3 commits — 3 feature/other, 0 fixes

By area

  • (root) — 1 commit
  • BrazilianUtils/BrazilianUtils.fsproj — 1 commit
  • BrazilianUtils/Data — 1 commit

Notable commits

  • change: Atualizações dos README.
  • change: Emparelhando funcionalidade com demais bibliotecas da BrazilianUtils.
  • change: Versão 2.4.0.

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

brazilian-utils/dotnet was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 4f27bed812fdf9c749ef341f2a6ee212762279f6 — the exact code this score is about.
  • Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-4f4226d619ea.