File tree Expand file tree Collapse file tree 3 files changed +607711
-607681
lines changed
Expand file tree Collapse file tree 3 files changed +607711
-607681
lines changed Original file line number Diff line number Diff line change 44 pull_request :
55
66jobs :
7+ csv :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout
11+ uses : actions/checkout@v4
12+ - name : Lint
13+ run : |
14+ set -e
15+ 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
16+ for filename in data/v2/csv/*.csv; do
17+ echo "$filename"
18+ ./csvlint -lazyquotes "$filename" # TODO: remove lazyquotes when https://github.com/Clever/csvlint/issues/45 will be addressed
19+ done
720 sqlite :
821 runs-on : ubuntu-latest
922 steps :
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