We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87da07f commit 1342818Copy full SHA for 1342818
.github/workflows/csvlint.yml
@@ -7,7 +7,17 @@ jobs:
7
runs-on: ubuntu-latest
8
steps:
9
- uses: actions/checkout@v4
10
- - name: Install csvkit
11
- run: pip install csvkit
12
- - name: Validate CSV file with csvclean
13
- run: csvclean .shelldio/all_stations.txt
+ - name: Validate CSV structure
+ run: |
+ python3 <<EOF
+ import sys, re
14
+ with open('.shelldio/all_stations.txt') as f:
15
+ for i, line in enumerate(f, 1):
16
+ parts = [p.strip() for p in line.strip().split(',', 1)]
17
+ if len(parts) != 2 or not parts[0] or not parts[1]:
18
+ print(f"Line {i} is invalid: {line.strip()}")
19
+ sys.exit(1)
20
+ if not re.match(r'https?://', parts[1]):
21
+ print(f"Line {i} has invalid URL: {parts[1]}")
22
23
+ EOF
0 commit comments