A Go library and CLI tool for validating CSV files against RFC 4180 standards.
csvlint is a Go library and command-line utility designed to validate CSV files against the RFC 4180 standard. It checks for common formatting issues like incorrect field counts, malformed quotes, and delimiter problems, ensuring data files are properly structured for parsing and analysis.
Data engineers, developers, and analysts who work with CSV data and need to ensure file integrity before processing or importing.
It provides a lightweight, standards-based validation tool with clear error reporting and configurable options, making it easier to catch CSV formatting issues early without complex dependencies.
library and command line tool that validates a CSV file
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Validates against RFC 4180 by default, ensuring CSV files are compatible with standard parsers and preventing common formatting errors like malformed quotes or incorrect field counts.
Supports custom single-character delimiters and lazy quote handling via the --lazyquotes flag, allowing validation of non-standard or real-world data files with configurable leniency.
Provides specific error messages with record and line numbers, such as 'Record #2 has error: wrong number of fields in line', making debugging straightforward and efficient.
Uses distinct exit codes (0 for valid, 1 for parsing errors, 2 for lint failures) to facilitate automation in CI/CD workflows or data pipelines, as documented in the examples.
Requires an initial header row for validation, limiting its use for CSV files without headers, as stated in the README, which can be a barrier for headerless data formats.
Only allows single-character delimiters and explicitly dismisses multi-character options, which might be necessary in some data exchange scenarios, reducing flexibility for non-standard separators.
The lazyquotes option can cause files to pass validation but parse incorrectly, as warned in the documentation, potentially masking real formatting issues and leading to data integrity problems.