diff --git a/README.md b/README.md index cbd1252c..3e00e709 100644 --- a/README.md +++ b/README.md @@ -380,7 +380,7 @@ Batch processing Validation * [x] ~~`filename_pattern` validation with regex (like "all files in the folder should be in the format `/^[\d]{4}-[\d]{2}-[\d]{2}\.csv$/`").~~ * [ ] Flag to ignore file name pattern. It's useful when you have a lot of files and you don't want to validate the file name. -* [ ] Keyword for null value. Configurable. By default, it's an empty string. But you can use `null`, `nil`, `none`, `empty`, etc. +* [ ] Keyword for null value. Configurable. By default, it's an empty string. But you can use `null`, `nil`, `none`, `empty`, etc. Overridable on the column level. * [ ] Agregate rules (like "at least one of the fields should be not empty" or "all values must be unique"). * [ ] Handle empty files and files with only a header row, or only with one line of data. One column wthout header is also possible. * [ ] Using multiple schemas for one csv file. @@ -409,6 +409,8 @@ Mock data generation * [ ] Use [Faker](https://github.com/FakerPHP/Faker) for random data generation. Reporting +* [ ] Fix auto width of tables in Githu terminal. +* [ ] * [ ] More report formats (like JSON, XML, etc). Any ideas? * [ ] Gitlab and JUnit reports must be as one structure. It's not so easy to implement. But it's a good idea. * [ ] Merge reports from multiple CSV files into one report. It's useful when you have a lot of files and you want to see all errors in one place. Especially for GitLab and JUnit reports. diff --git a/schema-examples/full.yml b/schema-examples/full.yml index 136e73cb..3f351a10 100644 --- a/schema-examples/full.yml +++ b/schema-examples/full.yml @@ -52,8 +52,8 @@ columns: max_word_count: 5 # Integer only. Max count of words in the string Example: "Hello World! 123" - 2 words only (123 is not a word) at_least_contains: [ a, b ] # At least one of the string must be in the CSV value. Case-sensitive. all_must_contain: [ a, b, c ] # All the strings must be part of a CSV value. Case-sensitive. - str_ends_with: " suffix" # Case-sensitive. Example: "Hello World suffix" str_starts_with: "prefix " # Case-sensitive. Example: "prefix Hello World" + str_ends_with: " suffix" # Case-sensitive. Example: "Hello World suffix" # Decimal and integer numbers min: 10 # Can be integer or float, negative and positive diff --git a/src/Validators/ErrorSuite.php b/src/Validators/ErrorSuite.php index 4a625448..78a29608 100644 --- a/src/Validators/ErrorSuite.php +++ b/src/Validators/ErrorSuite.php @@ -207,6 +207,9 @@ private static function getTableSize(): array // Fallback to 80 if the terminal width cannot be determined. // env.COLUMNS_TEST usually not defined so we use it only for testing purposes. $maxAutoDetected = Env::int('COLUMNS_TEST', Cli::getNumberOfColumns()); + if (Env::bool('GITHUB_ACTIONS')) { + $maxAutoDetected = 150; // GitHub Actions has a wide terminal + } $maxWindowWidth = Vars::limit( $maxAutoDetected,