Skip to content

Commit

Permalink
cicd: enable lazyquotes flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Naramsim committed Mar 1, 2025
1 parent d5b02ba commit 523e00e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
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
for filename in data/v2/csv/*.csv; do
echo "$filename"
./csvlint "$filename"
./csvlint -lazyquotes "$filename" # TODO: remove lazyquotes when https://github.com/Clever/csvlint/issues/45 will be addressed
done
sqlite:
runs-on: ubuntu-latest
Expand Down
17 changes: 17 additions & 0 deletions Resources/scripts/data/add_missing_comma.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Check if a csv has all required commas

var fs = require("fs");

var allLines = fs.readFileSync('./data/v2/csv/pokemon_moves.csv').toString().split('\n');

allLines.forEach(function (line) {
var count = (line.match(/,/g) || []).length;
if (count === 5) {
line = line + ","
}else if ( count === 6) {
console.log('found mastery')
} else if (count < 5) {
console.log('?')
}
fs.appendFileSync("./data/v2/csv/pokemon_moves1.csv", line.toString() + "\n");
});

0 comments on commit 523e00e

Please sign in to comment.