Skip to content

Commit 0940b27

Browse files
committed
vastlint v0.1.0 — VAST XML validator covering IAB VAST 2.0 through 4.3
0 parents  commit 0940b27

101 files changed

Lines changed: 9639 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Questions & Discussion
4+
url: https://github.com/aleksUIX/vastlint/discussions
5+
about: Ask questions, share how you're using vastlint, or suggest features.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: "I'm using vastlint in production"
2+
description: Let us know where vastlint is running. Helps prioritize rules and version support.
3+
title: "Production usage: [company or project]"
4+
labels: ["production-usage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
If you're running vastlint in a real pipeline, CI job, or ad serving stack, we'd like to hear about it.
10+
This helps us understand which VAST versions and rule categories matter most, and prioritize accordingly.
11+
12+
All fields are optional. Share as much or as little as you're comfortable with.
13+
14+
- type: input
15+
id: company
16+
attributes:
17+
label: Company or project
18+
description: Where is vastlint running? Company name, open-source project, or "prefer not to say" are all fine.
19+
placeholder: e.g. Acme Ad Tech, my-oss-project, prefer not to say
20+
validations:
21+
required: false
22+
23+
- type: dropdown
24+
id: use-case
25+
attributes:
26+
label: How are you using it?
27+
options:
28+
- CI/CD pipeline
29+
- Unit/integration tests
30+
- Ad serving pipeline (inline validation)
31+
- Monitoring/observability
32+
- Local development
33+
- Other
34+
validations:
35+
required: false
36+
37+
- type: dropdown
38+
id: integration
39+
attributes:
40+
label: Integration method
41+
options:
42+
- CLI binary
43+
- vastlint-core Rust library
44+
- Other
45+
validations:
46+
required: false
47+
48+
- type: input
49+
id: vast-versions
50+
attributes:
51+
label: Which VAST versions do you see in traffic?
52+
placeholder: e.g. mostly 4.2, some 3.0 from legacy partners
53+
validations:
54+
required: false
55+
56+
- type: textarea
57+
id: comments
58+
attributes:
59+
label: Anything else?
60+
description: Problems you've hit, rules you wish existed, features that would help.
61+
validations:
62+
required: false

.github/workflows/ci.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_BACKTRACE: 1
12+
13+
jobs:
14+
test:
15+
name: Test (${{ matrix.os }})
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-latest, macos-latest, windows-latest]
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Install Rust toolchain
26+
uses: dtolnay/rust-toolchain@stable
27+
with:
28+
components: clippy, rustfmt
29+
30+
- uses: Swatinem/rust-cache@v2
31+
32+
- name: cargo fmt --check
33+
run: cargo fmt --all -- --check
34+
35+
- name: cargo clippy
36+
run: cargo clippy --all-targets --all-features -- -D warnings
37+
38+
- name: cargo test
39+
run: cargo test --all
40+
41+
msrv:
42+
name: MSRV (1.75)
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v4
46+
- uses: dtolnay/rust-toolchain@1.75
47+
- uses: Swatinem/rust-cache@v2
48+
- name: cargo build
49+
run: cargo build --all
50+
51+
doc:
52+
name: Documentation
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v4
56+
- uses: dtolnay/rust-toolchain@stable
57+
- uses: Swatinem/rust-cache@v2
58+
- name: cargo doc
59+
run: cargo doc --no-deps --workspace
60+
env:
61+
RUSTDOCFLAGS: -D warnings

.github/workflows/release.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+"
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
build:
13+
name: Build ${{ matrix.target }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- target: x86_64-unknown-linux-musl
20+
os: ubuntu-latest
21+
binary: vastlint
22+
archive: vastlint-linux-x86_64.tar.gz
23+
24+
- target: aarch64-unknown-linux-musl
25+
os: ubuntu-latest
26+
binary: vastlint
27+
archive: vastlint-linux-aarch64.tar.gz
28+
29+
- target: x86_64-apple-darwin
30+
os: macos-latest
31+
binary: vastlint
32+
archive: vastlint-macos-x86_64.tar.gz
33+
34+
- target: aarch64-apple-darwin
35+
os: macos-latest
36+
binary: vastlint
37+
archive: vastlint-macos-aarch64.tar.gz
38+
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- name: Install Rust toolchain
43+
uses: dtolnay/rust-toolchain@stable
44+
with:
45+
targets: ${{ matrix.target }}
46+
47+
- name: Install musl tools (Linux)
48+
if: contains(matrix.target, 'musl')
49+
run: |
50+
sudo apt-get update -q
51+
sudo apt-get install -y musl-tools
52+
53+
- name: Install cross (Linux aarch64)
54+
if: matrix.target == 'aarch64-unknown-linux-musl'
55+
run: cargo install cross --locked
56+
57+
- name: Build (cross — Linux aarch64)
58+
if: matrix.target == 'aarch64-unknown-linux-musl'
59+
run: cross build --release --target ${{ matrix.target }} -p vastlint-cli
60+
61+
- name: Build (cargo — all others)
62+
if: matrix.target != 'aarch64-unknown-linux-musl'
63+
run: cargo build --release --target ${{ matrix.target }} -p vastlint-cli
64+
65+
- name: Package
66+
run: |
67+
BINARY=target/${{ matrix.target }}/release/${{ matrix.binary }}
68+
tar czf ${{ matrix.archive }} -C $(dirname $BINARY) $(basename $BINARY)
69+
70+
- name: Upload artifact
71+
uses: actions/upload-artifact@v4
72+
with:
73+
name: ${{ matrix.archive }}
74+
path: ${{ matrix.archive }}
75+
76+
release:
77+
name: Create GitHub Release
78+
needs: build
79+
runs-on: ubuntu-latest
80+
permissions:
81+
contents: write
82+
83+
steps:
84+
- uses: actions/checkout@v4
85+
86+
- name: Download all artifacts
87+
uses: actions/download-artifact@v4
88+
with:
89+
path: artifacts
90+
merge-multiple: true
91+
92+
- name: Create release
93+
uses: softprops/action-gh-release@v2
94+
with:
95+
files: artifacts/*
96+
generate_release_notes: true
97+
98+
publish:
99+
name: Publish to crates.io
100+
needs: build
101+
runs-on: ubuntu-latest
102+
# Set ENABLE_CRATES_PUBLISH to "true" in repo variables (Settings → Variables)
103+
# to enable publishing. Without it this job is skipped entirely.
104+
if: vars.ENABLE_CRATES_PUBLISH == 'true'
105+
106+
steps:
107+
- uses: actions/checkout@v4
108+
109+
- name: Install Rust toolchain
110+
uses: dtolnay/rust-toolchain@stable
111+
112+
- name: Publish vastlint-core
113+
run: cargo publish -p vastlint-core --no-verify
114+
env:
115+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
116+
117+
# Wait for crates.io to index the core crate before publishing the CLI
118+
- name: Wait for crates.io index
119+
run: sleep 30
120+
121+
- name: Publish vastlint-cli
122+
run: cargo publish -p vastlint-cli --no-verify
123+
env:
124+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
DESIGN.md
2+
ARCHITECTURE.md
3+
TODO.md
4+
specs/
5+
scratch/
6+
target/
7+
.DS_Store
8+
notes/

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Contributing
2+
3+
vastlint is not accepting external pull requests yet. The codebase is being incorporated into production systems and the API and rule set are still stabilising.
4+
5+
Once that's done, this file will be updated with contribution guidelines.
6+
7+
In the meantime:
8+
9+
File bugs via GitHub Issues. Include the VAST tag that triggered the problem (or a minimal reproduction), the vastlint version, and the output you got vs. what you expected.
10+
11+
If you have a rule idea or a spec reference that vastlint gets wrong, open an issue. That kind of feedback is useful now even if code contributions aren't.

0 commit comments

Comments
 (0)