Skip to content

Commit 987dcdd

Browse files
author
FMATheNomad
committed
Initial release: aiverify v0.1.0
Verify AI-generated code before you commit — 3 seconds, zero config. - 15 tree-sitter-based rules for Python, JavaScript, TypeScript - Detects: hallucinated functions, unused imports, deprecated APIs, wrong argument order, type mismatches, hardcoded credentials, infinite loops, unused variables, commented dead code, magic numbers - CLI with JSON output for CI/CD integration - 42 tests, all passing - MIT licensed
0 parents  commit 987dcdd

32 files changed

Lines changed: 2944 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.11", "3.12", "3.13"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
pip install -e .
29+
30+
- name: Run tests
31+
run: |
32+
python -m pytest tests/ -v
33+
34+
- name: Run aiverify on itself
35+
run: |
36+
python -m aiverify --version
37+
python -m aiverify --list-rules

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*.egg-info/
5+
.eggs/
6+
dist/
7+
build/
8+
9+
# Virtualenv
10+
__pycache__/
11+
venv/
12+
.venv/
13+
env/
14+
*.egg-info/
15+
dist/
16+
build/
17+
.aiverifyrc
18+
19+
# Config
20+
.aiverifyrc
21+
22+
# IDE
23+
.vscode/
24+
.idea/
25+
*.swp
26+
*.swo
27+
28+
# OS
29+
.DS_Store
30+
Thumbs.db
31+
32+
# Coverage
33+
.coverage
34+
htmlcov/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 FMA Software Labs
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.PHONY: test build publish clean install
2+
3+
test:
4+
python -m pytest tests/ -v
5+
6+
build:
7+
python -m build
8+
9+
publish:
10+
python -m twine upload dist/*
11+
12+
clean:
13+
rm -rf dist/ build/ *.egg-info/ .aiverifyrc
14+
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
15+
find . -type f -name '*.pyc' -delete
16+
17+
install:
18+
pip install -e .
19+
20+
install-dev:
21+
pip install -e ".[dev]"
22+
23+
lint:
24+
ruff check aiverify/ tests/

0 commit comments

Comments
 (0)