windbag 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. windbag-0.1.0/.claude-plugin/marketplace.json +13 -0
  2. windbag-0.1.0/.github/workflows/pypi.yml +107 -0
  3. windbag-0.1.0/.gitignore +1 -0
  4. windbag-0.1.0/.pre-commit-config.yaml +10 -0
  5. windbag-0.1.0/.pre-commit-hooks.yaml +7 -0
  6. windbag-0.1.0/Cargo.lock +594 -0
  7. windbag-0.1.0/Cargo.toml +35 -0
  8. windbag-0.1.0/LICENSE +21 -0
  9. windbag-0.1.0/PKG-INFO +231 -0
  10. windbag-0.1.0/README.md +220 -0
  11. windbag-0.1.0/examples/scalevp.toml +6 -0
  12. windbag-0.1.0/plugin/.claude-plugin/plugin.json +9 -0
  13. windbag-0.1.0/plugin/commands/windbag.md +12 -0
  14. windbag-0.1.0/plugin/hooks/hooks.json +27 -0
  15. windbag-0.1.0/plugin/hooks/windbag-post-edit.sh +50 -0
  16. windbag-0.1.0/plugin/hooks/windbag-session-start.sh +31 -0
  17. windbag-0.1.0/pyproject.toml +18 -0
  18. windbag-0.1.0/src/comments.rs +273 -0
  19. windbag-0.1.0/src/config.rs +261 -0
  20. windbag-0.1.0/src/git.rs +154 -0
  21. windbag-0.1.0/src/lang.rs +77 -0
  22. windbag-0.1.0/src/lib.rs +7 -0
  23. windbag-0.1.0/src/main.rs +272 -0
  24. windbag-0.1.0/src/output.rs +28 -0
  25. windbag-0.1.0/src/rules.rs +510 -0
  26. windbag-0.1.0/src/sql.rs +141 -0
  27. windbag-0.1.0/tests/fixtures/clean.tf +16 -0
  28. windbag-0.1.0/tests/fixtures/clean.yml +13 -0
  29. windbag-0.1.0/tests/fixtures/hedge_language.py +9 -0
  30. windbag-0.1.0/tests/fixtures/jsdoc_slop.ts +8 -0
  31. windbag-0.1.0/tests/fixtures/legit_why.py +13 -0
  32. windbag-0.1.0/tests/fixtures/obvious_comment.rs +17 -0
  33. windbag-0.1.0/tests/fixtures/rust_doc_slop.rs +6 -0
  34. windbag-0.1.0/tests/fixtures/rust_slop.rs +6 -0
  35. windbag-0.1.0/tests/fixtures/slop.html +4 -0
  36. windbag-0.1.0/tests/fixtures/slop.md +11 -0
  37. windbag-0.1.0/tests/fixtures/slop.sql +24 -0
  38. windbag-0.1.0/tests/fixtures/slop.tf +10 -0
  39. windbag-0.1.0/tests/fixtures/slop.yml +4 -0
  40. windbag-0.1.0/tests/integration.rs +623 -0
  41. windbag-0.1.0/windbag.toml +3 -0
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "windbag",
3
+ "owner": {
4
+ "name": "Harry Plumer"
5
+ },
6
+ "plugins": [
7
+ {
8
+ "name": "windbag",
9
+ "source": "./plugin",
10
+ "description": "Catches AI-slop comments as they are written, not at commit time."
11
+ }
12
+ ]
13
+ }
@@ -0,0 +1,107 @@
1
+ name: PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ check-version:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - name: Check tag matches pyproject.toml version
16
+ run: |
17
+ TAG_VERSION="${GITHUB_REF_NAME#v}"
18
+ PKG_VERSION=$(grep -m1 '^version' pyproject.toml | sed -E 's/version = "(.*)"/\1/')
19
+ if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
20
+ echo "release tag $GITHUB_REF_NAME does not match pyproject.toml version $PKG_VERSION" >&2
21
+ exit 1
22
+ fi
23
+
24
+ linux:
25
+ needs: check-version
26
+ runs-on: ubuntu-latest
27
+ strategy:
28
+ matrix:
29
+ target: [x86_64, aarch64]
30
+ steps:
31
+ - uses: actions/checkout@v4
32
+ - uses: PyO3/maturin-action@v1
33
+ env:
34
+ CFLAGS: -D_GNU_SOURCE
35
+ with:
36
+ target: ${{ matrix.target }}
37
+ args: --release --out dist
38
+ manylinux: auto
39
+ sccache: "true"
40
+ - uses: actions/upload-artifact@v4
41
+ with:
42
+ name: wheels-linux-${{ matrix.target }}
43
+ path: dist
44
+
45
+ macos:
46
+ needs: check-version
47
+ runs-on: macos-latest
48
+ strategy:
49
+ matrix:
50
+ target: [x86_64, aarch64]
51
+ steps:
52
+ - uses: actions/checkout@v4
53
+ - uses: PyO3/maturin-action@v1
54
+ with:
55
+ target: ${{ matrix.target }}
56
+ args: --release --out dist
57
+ sccache: "true"
58
+ - uses: actions/upload-artifact@v4
59
+ with:
60
+ name: wheels-macos-${{ matrix.target }}
61
+ path: dist
62
+
63
+ windows:
64
+ needs: check-version
65
+ runs-on: windows-latest
66
+ steps:
67
+ - uses: actions/checkout@v4
68
+ - uses: PyO3/maturin-action@v1
69
+ with:
70
+ target: x64
71
+ args: --release --out dist
72
+ sccache: "true"
73
+ - uses: actions/upload-artifact@v4
74
+ with:
75
+ name: wheels-windows-x64
76
+ path: dist
77
+
78
+ sdist:
79
+ needs: check-version
80
+ runs-on: ubuntu-latest
81
+ steps:
82
+ - uses: actions/checkout@v4
83
+ - uses: PyO3/maturin-action@v1
84
+ with:
85
+ command: sdist
86
+ args: --out dist
87
+ - uses: actions/upload-artifact@v4
88
+ with:
89
+ name: wheels-sdist
90
+ path: dist
91
+
92
+ publish:
93
+ name: Publish to PyPI
94
+ needs: [linux, macos, windows, sdist]
95
+ runs-on: ubuntu-latest
96
+ environment: pypi
97
+ permissions:
98
+ id-token: write
99
+ steps:
100
+ - uses: actions/download-artifact@v4
101
+ with:
102
+ pattern: wheels-*
103
+ path: dist
104
+ merge-multiple: true
105
+ - uses: pypa/gh-action-pypi-publish@release/v1
106
+ with:
107
+ packages-dir: dist
@@ -0,0 +1 @@
1
+ /target
@@ -0,0 +1,10 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: windbag
5
+ name: windbag
6
+ description: Flags comments that narrate change history instead of a current constraint
7
+ entry: windbag check --staged
8
+ language: system
9
+ pass_filenames: false
10
+ types_or: [python, javascript, jsx, ts, tsx, terraform, rust, yaml, markdown, html, sql]
@@ -0,0 +1,7 @@
1
+ - id: windbag
2
+ name: windbag
3
+ description: Flags comments that narrate change history instead of a current constraint
4
+ entry: windbag check --staged
5
+ language: system
6
+ pass_filenames: false
7
+ types_or: [python, javascript, jsx, ts, tsx, terraform, rust, yaml, markdown, html, sql]