Skip to content

Commit 883a723

Browse files
restyled-io[bot]shravanshetty1restyled-commits
authored
Restyle Modified CI to do csv linting (slurpcode#573)
* added csv lint to ci * renamed job in CI * 111 - fixing shell check issues * Restyled by shfmt Co-authored-by: shravanshetty1 <[email protected]> Co-authored-by: Shravan Shetty <[email protected]> Co-authored-by: Restyled.io <[email protected]>
1 parent 2ced401 commit 883a723

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.circleci/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,15 @@ jobs:
149149
keys:
150150
- v1-pkg-cache
151151
- run: go get -u github.com/mgechev/revive
152+
- run: go get -u github.com/Clever/csvlint/cmd/csvlint
152153
- run:
153154
name: 🧹 Run Golang revive lint
154155
command: |
155156
sh ./check-revive.sh || exit 1
157+
- run:
158+
name: 🧹 Run CSV lint
159+
command: |
160+
sh ./check-csv.sh || exit 1
156161
- run:
157162
name: 🧪 Run Go test
158163
command: |

check-csv.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
# print first
4+
find . -type f -name '*.csv' -printf '%p\n' | xargs -t -n1 csvlint
5+
6+
# exit if invalid
7+
# shellcheck disable=SC2016
8+
find . -type f -name '*.csv' -printf '%p\n' | xargs -n1 sh -c 'csvlint $0 || exit 255' >/dev/null

0 commit comments

Comments
 (0)