File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1515 curl -sSL https://github.com/Clever/csvlint/releases/download/v0.3.0/csvlint-v0.3.0-linux-amd64.tar.gz | tar xz --strip-components=1
1616 for filename in data/v2/csv/*.csv; do
1717 echo "$filename"
18- ./csvlint "$filename"
18+ ./csvlint -lazyquotes "$filename" # TODO: remove lazyquotes when https://github.com/Clever/csvlint/issues/45 will be addressed
1919 done
2020 sqlite :
2121 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1+ // Check if a csv has all required commas
2+
3+ var fs = require ( "fs" ) ;
4+
5+ var allLines = fs . readFileSync ( './data/v2/csv/pokemon_moves.csv' ) . toString ( ) . split ( '\n' ) ;
6+
7+ allLines . forEach ( function ( line ) {
8+ var count = ( line . match ( / , / g) || [ ] ) . length ;
9+ if ( count === 5 ) {
10+ line = line + ","
11+ } else if ( count === 6 ) {
12+ console . log ( 'found mastery' )
13+ } else if ( count < 5 ) {
14+ console . log ( '?' )
15+ }
16+ fs . appendFileSync ( "./data/v2/csv/pokemon_moves1.csv" , line . toString ( ) + "\n" ) ;
17+ } ) ;
You can’t perform that action at this time.
0 commit comments