vsg-rs 0.2.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 (122) hide show
  1. vsg_rs-0.2.0/.github/workflows/ci.yml +41 -0
  2. vsg_rs-0.2.0/.github/workflows/release.yml +207 -0
  3. vsg_rs-0.2.0/.gitignore +5 -0
  4. vsg_rs-0.2.0/Cargo.lock +520 -0
  5. vsg_rs-0.2.0/Cargo.toml +50 -0
  6. vsg_rs-0.2.0/LICENSE-APACHE +201 -0
  7. vsg_rs-0.2.0/LICENSE-MIT +25 -0
  8. vsg_rs-0.2.0/PKG-INFO +150 -0
  9. vsg_rs-0.2.0/README.md +120 -0
  10. vsg_rs-0.2.0/THIRD_PARTY_LICENSES.md +72 -0
  11. vsg_rs-0.2.0/clippy.toml +1 -0
  12. vsg_rs-0.2.0/docs/architecture.md +81 -0
  13. vsg_rs-0.2.0/docs/compatibility.md +111 -0
  14. vsg_rs-0.2.0/docs/editors.md +68 -0
  15. vsg_rs-0.2.0/docs/formatting.md +143 -0
  16. vsg_rs-0.2.0/docs/line-folding-coverage.md +98 -0
  17. vsg_rs-0.2.0/docs/line-folding.md +122 -0
  18. vsg_rs-0.2.0/docs/performance.md +57 -0
  19. vsg_rs-0.2.0/docs/releasing.md +70 -0
  20. vsg_rs-0.2.0/docs/rule-status.md +235 -0
  21. vsg_rs-0.2.0/docs/upstream-bugs.md +787 -0
  22. vsg_rs-0.2.0/docs/upstream-limitations.md +63 -0
  23. vsg_rs-0.2.0/docs/vhdl-frontend.md +83 -0
  24. vsg_rs-0.2.0/docs/vsg-config.md +252 -0
  25. vsg_rs-0.2.0/docs/vsg-rules.md +1062 -0
  26. vsg_rs-0.2.0/examples/bench.rs +118 -0
  27. vsg_rs-0.2.0/examples/corpus.rs +139 -0
  28. vsg_rs-0.2.0/examples/dump.rs +24 -0
  29. vsg_rs-0.2.0/pyproject.toml +42 -0
  30. vsg_rs-0.2.0/python/tests/smoke.py +64 -0
  31. vsg_rs-0.2.0/python/vsg_rs/__init__.py +29 -0
  32. vsg_rs-0.2.0/python/vsg_rs/__main__.py +22 -0
  33. vsg_rs-0.2.0/src/align.rs +408 -0
  34. vsg_rs-0.2.0/src/blank.rs +650 -0
  35. vsg_rs-0.2.0/src/config.rs +682 -0
  36. vsg_rs-0.2.0/src/doc.rs +627 -0
  37. vsg_rs-0.2.0/src/fix.rs +295 -0
  38. vsg_rs-0.2.0/src/format.rs +1444 -0
  39. vsg_rs-0.2.0/src/fuzz.rs +152 -0
  40. vsg_rs-0.2.0/src/keywords.rs +205 -0
  41. vsg_rs-0.2.0/src/lib.rs +537 -0
  42. vsg_rs-0.2.0/src/main.rs +710 -0
  43. vsg_rs-0.2.0/src/report.rs +186 -0
  44. vsg_rs-0.2.0/src/rules/case.rs +828 -0
  45. vsg_rs-0.2.0/src/rules/catalog.rs +987 -0
  46. vsg_rs-0.2.0/src/rules/length.rs +148 -0
  47. vsg_rs-0.2.0/src/rules/mod.rs +357 -0
  48. vsg_rs-0.2.0/src/rules/naming.rs +830 -0
  49. vsg_rs-0.2.0/src/rules/select.rs +244 -0
  50. vsg_rs-0.2.0/src/rules/structure.rs +841 -0
  51. vsg_rs-0.2.0/src/rules/transform.rs +1039 -0
  52. vsg_rs-0.2.0/src/verify.rs +88 -0
  53. vsg_rs-0.2.0/tests/cli.rs +177 -0
  54. vsg_rs-0.2.0/tests/formatting/assert_report_wait.out.vhd +31 -0
  55. vsg_rs-0.2.0/tests/formatting/assert_report_wait.vhd +14 -0
  56. vsg_rs-0.2.0/tests/formatting/assignments.out.vhd +54 -0
  57. vsg_rs-0.2.0/tests/formatting/assignments.vhd +19 -0
  58. vsg_rs-0.2.0/tests/formatting/boundaries.out.vhd +14 -0
  59. vsg_rs-0.2.0/tests/formatting/boundaries.vhd +11 -0
  60. vsg_rs-0.2.0/tests/formatting/calls_aggregates.out.vhd +59 -0
  61. vsg_rs-0.2.0/tests/formatting/calls_aggregates.vhd +15 -0
  62. vsg_rs-0.2.0/tests/formatting/comments.out.vhd +36 -0
  63. vsg_rs-0.2.0/tests/formatting/comments.vhd +28 -0
  64. vsg_rs-0.2.0/tests/formatting/conditions.out.vhd +44 -0
  65. vsg_rs-0.2.0/tests/formatting/conditions.vhd +21 -0
  66. vsg_rs-0.2.0/tests/formatting/configuration_context.out.vhd +26 -0
  67. vsg_rs-0.2.0/tests/formatting/configuration_context.vhd +9 -0
  68. vsg_rs-0.2.0/tests/formatting/crlf.out.vhd +2 -0
  69. vsg_rs-0.2.0/tests/formatting/crlf.vhd +2 -0
  70. vsg_rs-0.2.0/tests/formatting/declarations.out.vhd +88 -0
  71. vsg_rs-0.2.0/tests/formatting/declarations.vhd +34 -0
  72. vsg_rs-0.2.0/tests/formatting/deep_nesting.out.vhd +28 -0
  73. vsg_rs-0.2.0/tests/formatting/deep_nesting.vhd +6 -0
  74. vsg_rs-0.2.0/tests/formatting/entity_interface.out.vhd +21 -0
  75. vsg_rs-0.2.0/tests/formatting/entity_interface.vhd +8 -0
  76. vsg_rs-0.2.0/tests/formatting/fmt_off.out.vhd +27 -0
  77. vsg_rs-0.2.0/tests/formatting/fmt_off.vhd +22 -0
  78. vsg_rs-0.2.0/tests/formatting/generate_case_loop.out.vhd +74 -0
  79. vsg_rs-0.2.0/tests/formatting/generate_case_loop.vhd +37 -0
  80. vsg_rs-0.2.0/tests/formatting/instantiation.out.vhd +56 -0
  81. vsg_rs-0.2.0/tests/formatting/instantiation.vhd +14 -0
  82. vsg_rs-0.2.0/tests/formatting/keyword_case.out.vhd +14 -0
  83. vsg_rs-0.2.0/tests/formatting/keyword_case.vhd +7 -0
  84. vsg_rs-0.2.0/tests/formatting/protected_types.out.vhd +39 -0
  85. vsg_rs-0.2.0/tests/formatting/protected_types.vhd +14 -0
  86. vsg_rs-0.2.0/tests/formatting/signatures.out.vhd +18 -0
  87. vsg_rs-0.2.0/tests/formatting/signatures.vhd +7 -0
  88. vsg_rs-0.2.0/tests/formatting/tool_directives.out.vhd +23 -0
  89. vsg_rs-0.2.0/tests/formatting/tool_directives.vhd +16 -0
  90. vsg_rs-0.2.0/tests/formatting/unbreakable.out.vhd +15 -0
  91. vsg_rs-0.2.0/tests/formatting/unbreakable.vhd +8 -0
  92. vsg_rs-0.2.0/tests/golden.rs +75 -0
  93. vsg_rs-0.2.0/tests/regressions/vsg_bug_001.vhd +8 -0
  94. vsg_rs-0.2.0/tests/regressions/vsg_bug_002.vhd +7 -0
  95. vsg_rs-0.2.0/tests/regressions/vsg_bug_003.vhd +3 -0
  96. vsg_rs-0.2.0/tests/regressions/vsg_bug_004.vhd +6 -0
  97. vsg_rs-0.2.0/tests/regressions/vsg_bug_005.vhd +13 -0
  98. vsg_rs-0.2.0/tests/regressions/vsg_bug_006.vhd +7 -0
  99. vsg_rs-0.2.0/tests/regressions/vsg_bug_007.vhd +11 -0
  100. vsg_rs-0.2.0/tests/regressions/vsg_bug_008.vhd +21 -0
  101. vsg_rs-0.2.0/tests/regressions/vsg_bug_009.vhd +13 -0
  102. vsg_rs-0.2.0/tests/regressions/vsg_bug_010.vhd +4 -0
  103. vsg_rs-0.2.0/tests/regressions/vsg_bug_011.vhd +4 -0
  104. vsg_rs-0.2.0/tests/regressions/vsg_bug_012.vhd +9 -0
  105. vsg_rs-0.2.0/tests/regressions/vsg_bug_013.vhd +12 -0
  106. vsg_rs-0.2.0/tests/regressions/vsg_bug_014.vhd +10 -0
  107. vsg_rs-0.2.0/tests/regressions/vsg_bug_015.vhd +9 -0
  108. vsg_rs-0.2.0/tests/regressions/vsg_bug_016.vhd +5 -0
  109. vsg_rs-0.2.0/tests/regressions/vsg_bug_017.vhd +8 -0
  110. vsg_rs-0.2.0/tests/regressions/vsg_bug_018.vhd +34 -0
  111. vsg_rs-0.2.0/tests/regressions/vsg_bug_020.vhd +21 -0
  112. vsg_rs-0.2.0/tests/regressions/vsg_bug_021.vhd +30 -0
  113. vsg_rs-0.2.0/tests/regressions/vsg_bug_022.vhd +25 -0
  114. vsg_rs-0.2.0/tests/regressions/vsg_bug_023.vhd +9 -0
  115. vsg_rs-0.2.0/tests/regressions/vsg_bug_024.vhd +8 -0
  116. vsg_rs-0.2.0/tests/regressions/vsg_bug_026.vhd +4 -0
  117. vsg_rs-0.2.0/tests/regressions/vsg_bug_027.vhd +9 -0
  118. vsg_rs-0.2.0/tests/regressions/vsg_bug_028.vhd +8 -0
  119. vsg_rs-0.2.0/tests/regressions/vsg_bug_029.vhd +13 -0
  120. vsg_rs-0.2.0/tests/regressions/vsg_bug_030.vhd +11 -0
  121. vsg_rs-0.2.0/tests/regressions/vsg_bug_034.vhd +15 -0
  122. vsg_rs-0.2.0/tests/regressions.rs +146 -0
@@ -0,0 +1,41 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ env:
9
+ CARGO_TERM_COLOR: always
10
+ RUSTFLAGS: -D warnings
11
+
12
+ jobs:
13
+ lint:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: dtolnay/rust-toolchain@stable
18
+ with:
19
+ components: rustfmt, clippy
20
+ - uses: Swatinem/rust-cache@v2
21
+ - run: cargo fmt --check
22
+ - run: cargo clippy --workspace --all-targets --all-features -- -D warnings
23
+
24
+ test:
25
+ strategy:
26
+ matrix:
27
+ os: [ubuntu-latest, windows-latest, macos-latest]
28
+ runs-on: ${{ matrix.os }}
29
+ steps:
30
+ - uses: actions/checkout@v4
31
+ - uses: dtolnay/rust-toolchain@stable
32
+ - uses: Swatinem/rust-cache@v2
33
+ - run: cargo test --workspace
34
+
35
+ msrv:
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+ - uses: dtolnay/rust-toolchain@1.95
40
+ - uses: Swatinem/rust-cache@v2
41
+ - run: cargo check --workspace --all-targets
@@ -0,0 +1,207 @@
1
+ # Builds and tests the `vsg-rs` Python package (a wheel that ships the `vsg-rs` binary) for Linux
2
+ # and Windows, and publishes it on version tags. See docs/releasing.md.
3
+ #
4
+ # - push of a tag `vX.Y.Z`: build, test, publish to PyPI, create a GitHub release
5
+ # - manual run (workflow_dispatch) or a pull request touching packaging: build and test only
6
+ name: Release
7
+
8
+ on:
9
+ push:
10
+ tags: ["v*"]
11
+ pull_request:
12
+ paths:
13
+ - "pyproject.toml"
14
+ - "python/**"
15
+ - ".github/workflows/release.yml"
16
+ workflow_dispatch:
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ env:
22
+ CARGO_TERM_COLOR: always
23
+
24
+ jobs:
25
+ version:
26
+ name: Check tag matches crate version
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v6
30
+ - name: Compare versions
31
+ if: startsWith(github.ref, 'refs/tags/')
32
+ env:
33
+ TAG: ${{ github.ref_name }}
34
+ run: |
35
+ crate=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)
36
+ if [ "$TAG" != "v$crate" ]; then
37
+ echo "::error::tag $TAG does not match Cargo.toml version $crate"
38
+ exit 1
39
+ fi
40
+
41
+ linux:
42
+ name: Wheel (${{ matrix.platform.manylinux }}, ${{ matrix.platform.target }})
43
+ needs: version
44
+ runs-on: ubuntu-22.04
45
+ strategy:
46
+ fail-fast: false
47
+ matrix:
48
+ platform:
49
+ - { target: x86_64, manylinux: "2_28" }
50
+ - { target: aarch64, manylinux: "2_28" }
51
+ - { target: x86_64, manylinux: musllinux_1_2 }
52
+ - { target: aarch64, manylinux: musllinux_1_2 }
53
+ steps:
54
+ - uses: actions/checkout@v6
55
+ - uses: PyO3/maturin-action@v1
56
+ with:
57
+ target: ${{ matrix.platform.target }}
58
+ manylinux: ${{ matrix.platform.manylinux }}
59
+ args: --release --out dist
60
+ - uses: actions/upload-artifact@v6
61
+ with:
62
+ name: wheels-linux-${{ matrix.platform.manylinux }}-${{ matrix.platform.target }}
63
+ path: dist
64
+
65
+ windows:
66
+ name: Wheel (windows, ${{ matrix.target }})
67
+ needs: version
68
+ runs-on: windows-latest
69
+ strategy:
70
+ fail-fast: false
71
+ matrix:
72
+ # aarch64 is cross-compiled on the x64 runner.
73
+ target: [x64, aarch64]
74
+ steps:
75
+ - uses: actions/checkout@v6
76
+ - uses: PyO3/maturin-action@v1
77
+ with:
78
+ target: ${{ matrix.target }}
79
+ args: --release --out dist
80
+ - uses: actions/upload-artifact@v6
81
+ with:
82
+ name: wheels-windows-${{ matrix.target }}
83
+ path: dist
84
+
85
+ sdist:
86
+ name: Source distribution
87
+ needs: version
88
+ runs-on: ubuntu-latest
89
+ steps:
90
+ - uses: actions/checkout@v6
91
+ - uses: PyO3/maturin-action@v1
92
+ with:
93
+ command: sdist
94
+ args: --out dist
95
+ - uses: actions/upload-artifact@v6
96
+ with:
97
+ name: wheels-sdist
98
+ path: dist
99
+
100
+ test-wheels:
101
+ name: Test wheel (${{ matrix.os }}, Python ${{ matrix.python }})
102
+ needs: [linux, windows]
103
+ runs-on: ${{ matrix.os }}
104
+ strategy:
105
+ fail-fast: false
106
+ matrix:
107
+ os: [ubuntu-latest, windows-latest]
108
+ python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
109
+ steps:
110
+ - uses: actions/checkout@v6
111
+ - uses: actions/setup-python@v6
112
+ with:
113
+ python-version: ${{ matrix.python }}
114
+ - uses: actions/download-artifact@v7
115
+ with:
116
+ pattern: wheels-*
117
+ path: dist
118
+ merge-multiple: true
119
+ - name: Install the wheel for this platform
120
+ shell: bash
121
+ run: |
122
+ python -m venv .venv
123
+ if [ "$RUNNER_OS" = "Windows" ]; then bin=.venv/Scripts; else bin=.venv/bin; fi
124
+ "$bin/python" -m pip install --upgrade pip
125
+ # --only-binary: never fall back to building the sdist here.
126
+ "$bin/python" -m pip install --no-index --only-binary :all: --find-links dist vsg-rs
127
+ # GITHUB_PATH needs a native path on Windows.
128
+ if [ "$RUNNER_OS" = "Windows" ]; then cygpath -w "$PWD/$bin"; else echo "$PWD/$bin"; fi >> "$GITHUB_PATH"
129
+ - name: Smoke test
130
+ shell: bash
131
+ run: python python/tests/smoke.py
132
+
133
+ test-sdist:
134
+ name: Build from sdist (${{ matrix.os }})
135
+ needs: sdist
136
+ runs-on: ${{ matrix.os }}
137
+ strategy:
138
+ fail-fast: false
139
+ matrix:
140
+ os: [ubuntu-latest, windows-latest]
141
+ steps:
142
+ - uses: actions/checkout@v6
143
+ - uses: actions/setup-python@v6
144
+ with:
145
+ python-version: "3.12"
146
+ - uses: dtolnay/rust-toolchain@stable
147
+ - uses: actions/download-artifact@v7
148
+ with:
149
+ name: wheels-sdist
150
+ path: dist
151
+ - name: Install from sdist
152
+ shell: bash
153
+ run: |
154
+ python -m venv .venv
155
+ if [ "$RUNNER_OS" = "Windows" ]; then bin=.venv/Scripts; else bin=.venv/bin; fi
156
+ "$bin/python" -m pip install dist/*.tar.gz
157
+ # GITHUB_PATH needs a native path on Windows.
158
+ if [ "$RUNNER_OS" = "Windows" ]; then cygpath -w "$PWD/$bin"; else echo "$PWD/$bin"; fi >> "$GITHUB_PATH"
159
+ - name: Smoke test
160
+ shell: bash
161
+ run: python python/tests/smoke.py
162
+
163
+ publish:
164
+ name: Publish to PyPI
165
+ needs: [test-wheels, test-sdist]
166
+ if: startsWith(github.ref, 'refs/tags/v')
167
+ runs-on: ubuntu-latest
168
+ environment:
169
+ name: pypi
170
+ url: https://pypi.org/project/vsg-rs/
171
+ permissions:
172
+ # PyPI trusted publishing and artifact attestations.
173
+ id-token: write
174
+ attestations: write
175
+ steps:
176
+ - uses: actions/download-artifact@v7
177
+ with:
178
+ pattern: wheels-*
179
+ path: dist
180
+ merge-multiple: true
181
+ # Artifact attestations need a public repository (or GitHub Enterprise Cloud).
182
+ - uses: actions/attest@v4
183
+ if: github.event.repository.visibility == 'public'
184
+ with:
185
+ subject-path: dist/*
186
+ - uses: pypa/gh-action-pypi-publish@release/v1
187
+ with:
188
+ packages-dir: dist
189
+ attestations: ${{ github.event.repository.visibility == 'public' }}
190
+
191
+ github-release:
192
+ name: GitHub release
193
+ needs: publish
194
+ runs-on: ubuntu-latest
195
+ permissions:
196
+ contents: write
197
+ steps:
198
+ - uses: actions/download-artifact@v7
199
+ with:
200
+ pattern: wheels-*
201
+ path: dist
202
+ merge-multiple: true
203
+ - name: Create release
204
+ env:
205
+ GH_TOKEN: ${{ github.token }}
206
+ TAG: ${{ github.ref_name }}
207
+ run: gh release create "$TAG" dist/* --repo "$GITHUB_REPOSITORY" --title "$TAG" --generate-notes --verify-tag
@@ -0,0 +1,5 @@
1
+ /target
2
+ /dist
3
+ __pycache__/
4
+ *.egg-info/
5
+ .venv/