konform 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.
- konform-0.1.0/.editorconfig +44 -0
- konform-0.1.0/.github/dependabot.yml +60 -0
- konform-0.1.0/.github/dependency-review-config.yml +25 -0
- konform-0.1.0/.github/workflows/ci.yml +129 -0
- konform-0.1.0/.github/workflows/release.yml +272 -0
- konform-0.1.0/.github/workflows/security.yml +86 -0
- konform-0.1.0/.gitignore +29 -0
- konform-0.1.0/.pre-commit-config.yaml +43 -0
- konform-0.1.0/CHANGELOG.md +24 -0
- konform-0.1.0/Cargo.lock +1751 -0
- konform-0.1.0/Cargo.toml +113 -0
- konform-0.1.0/LICENSE +21 -0
- konform-0.1.0/PKG-INFO +265 -0
- konform-0.1.0/README.md +241 -0
- konform-0.1.0/deny.toml +31 -0
- konform-0.1.0/konform_patterns.toml +69 -0
- konform-0.1.0/pyproject.toml +56 -0
- konform-0.1.0/rust-toolchain.toml +3 -0
- konform-0.1.0/src/cache.rs +668 -0
- konform-0.1.0/src/cli.rs +357 -0
- konform-0.1.0/src/config.rs +483 -0
- konform-0.1.0/src/engine.rs +352 -0
- konform-0.1.0/src/git.rs +52 -0
- konform-0.1.0/src/lsp/convert.rs +138 -0
- konform-0.1.0/src/lsp/handler.rs +651 -0
- konform-0.1.0/src/lsp/mod.rs +51 -0
- konform-0.1.0/src/lsp/session.rs +162 -0
- konform-0.1.0/src/main.rs +1283 -0
- konform-0.1.0/src/module_probe.rs +612 -0
- konform-0.1.0/src/output.rs +871 -0
- konform-0.1.0/src/rules/kis001.rs +1198 -0
- konform-0.1.0/src/rules/kpt.rs +1506 -0
- konform-0.1.0/src/rules/mod.rs +190 -0
- konform-0.1.0/src/theme.rs +264 -0
- konform-0.1.0/src/types.rs +139 -0
- konform-0.1.0/tests/cli_integration_test.rs +19 -0
- konform-0.1.0/tests/lsp_integration_test.rs +29 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# http://editorconfig.org
|
|
2
|
+
|
|
3
|
+
root = true
|
|
4
|
+
|
|
5
|
+
[*]
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 4
|
|
8
|
+
trim_trailing_whitespace = true
|
|
9
|
+
insert_final_newline = true
|
|
10
|
+
charset = utf-8
|
|
11
|
+
end_of_line = lf
|
|
12
|
+
|
|
13
|
+
[*.bat]
|
|
14
|
+
indent_style = tab
|
|
15
|
+
end_of_line = crlf
|
|
16
|
+
|
|
17
|
+
[*.{,ba,z}sh]
|
|
18
|
+
indent_size = 2
|
|
19
|
+
tab_width = 2
|
|
20
|
+
|
|
21
|
+
[LICENSE.txt]
|
|
22
|
+
insert_final_newline = false
|
|
23
|
+
|
|
24
|
+
[Makefile]
|
|
25
|
+
indent_style = tab
|
|
26
|
+
|
|
27
|
+
[*.json*]
|
|
28
|
+
indent_size = 2
|
|
29
|
+
|
|
30
|
+
[*.toml*]
|
|
31
|
+
indent_size = 2
|
|
32
|
+
|
|
33
|
+
[*.{markdown,md}]
|
|
34
|
+
trim_trailing_whitespace = false
|
|
35
|
+
|
|
36
|
+
[*.xml]
|
|
37
|
+
indent_size = 2
|
|
38
|
+
insert_final_newline = false
|
|
39
|
+
|
|
40
|
+
[*.y{a,}ml]
|
|
41
|
+
indent_size = 2
|
|
42
|
+
|
|
43
|
+
[*.rs]
|
|
44
|
+
indent_size = 4
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# Rust dependencies (main project)
|
|
4
|
+
- package-ecosystem: "cargo"
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "weekly"
|
|
8
|
+
day: "saturday"
|
|
9
|
+
time: "09:00"
|
|
10
|
+
timezone: "Europe/Amsterdam"
|
|
11
|
+
open-pull-requests-limit: 10
|
|
12
|
+
commit-message:
|
|
13
|
+
prefix: "deps"
|
|
14
|
+
include: "scope"
|
|
15
|
+
groups:
|
|
16
|
+
rust-minor-patch:
|
|
17
|
+
patterns:
|
|
18
|
+
- "*"
|
|
19
|
+
update-types:
|
|
20
|
+
- "minor"
|
|
21
|
+
- "patch"
|
|
22
|
+
|
|
23
|
+
# Rust dependencies (Zed extension)
|
|
24
|
+
- package-ecosystem: "cargo"
|
|
25
|
+
directory: "/extensions/zed-extension"
|
|
26
|
+
schedule:
|
|
27
|
+
interval: "weekly"
|
|
28
|
+
day: "saturday"
|
|
29
|
+
time: "09:00"
|
|
30
|
+
timezone: "Europe/Amsterdam"
|
|
31
|
+
open-pull-requests-limit: 5
|
|
32
|
+
commit-message:
|
|
33
|
+
prefix: "deps(zed)"
|
|
34
|
+
include: "scope"
|
|
35
|
+
|
|
36
|
+
# pip dependencies (Python dev tools)
|
|
37
|
+
- package-ecosystem: "pip"
|
|
38
|
+
directory: "/"
|
|
39
|
+
schedule:
|
|
40
|
+
interval: "weekly"
|
|
41
|
+
day: "saturday"
|
|
42
|
+
time: "09:00"
|
|
43
|
+
timezone: "Europe/Amsterdam"
|
|
44
|
+
open-pull-requests-limit: 5
|
|
45
|
+
commit-message:
|
|
46
|
+
prefix: "deps(python)"
|
|
47
|
+
include: "scope"
|
|
48
|
+
|
|
49
|
+
# GitHub Actions
|
|
50
|
+
- package-ecosystem: "github-actions"
|
|
51
|
+
directory: "/"
|
|
52
|
+
schedule:
|
|
53
|
+
interval: "weekly"
|
|
54
|
+
day: "saturday"
|
|
55
|
+
time: "09:00"
|
|
56
|
+
timezone: "Europe/Amsterdam"
|
|
57
|
+
open-pull-requests-limit: 5
|
|
58
|
+
commit-message:
|
|
59
|
+
prefix: "ci"
|
|
60
|
+
include: "scope"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Fail on high-severity or critical vulnerabilities introduced by a PR.
|
|
2
|
+
# Allow common permissive open-source licenses used by konform's dependency tree.
|
|
3
|
+
fail_on_severity: moderate
|
|
4
|
+
|
|
5
|
+
license_check: true
|
|
6
|
+
|
|
7
|
+
allow_licenses:
|
|
8
|
+
- MIT
|
|
9
|
+
- Apache-2.0
|
|
10
|
+
- BlueOak-1.0.0
|
|
11
|
+
- BSD-2-Clause
|
|
12
|
+
- BSD-3-Clause
|
|
13
|
+
- ISC
|
|
14
|
+
- MPL-2.0
|
|
15
|
+
- Unlicense
|
|
16
|
+
- 0BSD
|
|
17
|
+
- CC0-1.0
|
|
18
|
+
- Zlib
|
|
19
|
+
- CC-BY-4.0
|
|
20
|
+
- Python-2.0
|
|
21
|
+
- Unicode-3.0
|
|
22
|
+
- Unicode-DFS-2016
|
|
23
|
+
- BSL-1.0
|
|
24
|
+
|
|
25
|
+
comment_summary_in_pr: always
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
env:
|
|
13
|
+
CARGO_TERM_COLOR: always
|
|
14
|
+
RUST_BACKTRACE: 1
|
|
15
|
+
rust_version: "1.96"
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
test:
|
|
19
|
+
name: Test (${{ matrix.os }})
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v7
|
|
26
|
+
|
|
27
|
+
- name: Install Rust
|
|
28
|
+
uses: dtolnay/rust-toolchain@master
|
|
29
|
+
with:
|
|
30
|
+
toolchain: ${{ env.rust_version }}
|
|
31
|
+
components: rustfmt, clippy
|
|
32
|
+
|
|
33
|
+
- name: Cache Rust dependencies
|
|
34
|
+
uses: Swatinem/rust-cache@v2
|
|
35
|
+
with:
|
|
36
|
+
shared-key: "ci-${{ matrix.os }}"
|
|
37
|
+
|
|
38
|
+
- name: Check formatting
|
|
39
|
+
run: cargo fmt -- --check
|
|
40
|
+
|
|
41
|
+
- name: Run clippy
|
|
42
|
+
run: cargo clippy --all-targets --all-features -- -D warnings
|
|
43
|
+
|
|
44
|
+
- name: Build
|
|
45
|
+
run: cargo build --release --verbose
|
|
46
|
+
|
|
47
|
+
- name: Run Rust tests
|
|
48
|
+
run: cargo test --verbose
|
|
49
|
+
|
|
50
|
+
coverage:
|
|
51
|
+
name: Code Coverage
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v7
|
|
55
|
+
|
|
56
|
+
- name: Install Rust
|
|
57
|
+
uses: dtolnay/rust-toolchain@stable
|
|
58
|
+
|
|
59
|
+
- name: Cache Rust dependencies
|
|
60
|
+
uses: Swatinem/rust-cache@v2
|
|
61
|
+
with:
|
|
62
|
+
shared-key: "coverage"
|
|
63
|
+
|
|
64
|
+
- name: Install tarpaulin
|
|
65
|
+
run: cargo install cargo-tarpaulin
|
|
66
|
+
|
|
67
|
+
- name: Build binary for tests
|
|
68
|
+
run: cargo build
|
|
69
|
+
|
|
70
|
+
- name: Generate coverage report
|
|
71
|
+
run: cargo tarpaulin --out Xml --skip-clean
|
|
72
|
+
|
|
73
|
+
- name: Upload coverage to Codecov
|
|
74
|
+
uses: codecov/codecov-action@v7
|
|
75
|
+
with:
|
|
76
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
77
|
+
files: cobertura.xml
|
|
78
|
+
fail_ci_if_error: false
|
|
79
|
+
|
|
80
|
+
check-msrv:
|
|
81
|
+
name: Check MSRV (defined version)
|
|
82
|
+
runs-on: ubuntu-latest
|
|
83
|
+
steps:
|
|
84
|
+
- uses: actions/checkout@v7
|
|
85
|
+
|
|
86
|
+
- name: Install Rust
|
|
87
|
+
uses: dtolnay/rust-toolchain@master
|
|
88
|
+
with:
|
|
89
|
+
toolchain: ${{ env.rust_version }}
|
|
90
|
+
components: rustfmt
|
|
91
|
+
|
|
92
|
+
- name: Cache Rust dependencies
|
|
93
|
+
uses: Swatinem/rust-cache@v2
|
|
94
|
+
with:
|
|
95
|
+
shared-key: "msrv"
|
|
96
|
+
|
|
97
|
+
- name: Check build
|
|
98
|
+
run: cargo check --all-features
|
|
99
|
+
|
|
100
|
+
check-zed-extension:
|
|
101
|
+
name: Check Zed Extension
|
|
102
|
+
runs-on: ubuntu-latest
|
|
103
|
+
steps:
|
|
104
|
+
- uses: actions/checkout@v7
|
|
105
|
+
|
|
106
|
+
- name: Install Rust
|
|
107
|
+
uses: dtolnay/rust-toolchain@stable
|
|
108
|
+
with:
|
|
109
|
+
targets: wasm32-wasip1
|
|
110
|
+
|
|
111
|
+
- name: Cache Rust dependencies
|
|
112
|
+
uses: Swatinem/rust-cache@v2
|
|
113
|
+
with:
|
|
114
|
+
shared-key: "zed-extension"
|
|
115
|
+
workspaces: "extensions/zed-extension -> target"
|
|
116
|
+
|
|
117
|
+
- name: Check Zed extension compiles
|
|
118
|
+
run: |
|
|
119
|
+
cd extensions/zed-extension
|
|
120
|
+
cargo check --target wasm32-wasip1
|
|
121
|
+
|
|
122
|
+
- name: Validate extension.toml
|
|
123
|
+
run: |
|
|
124
|
+
cd extensions/zed-extension
|
|
125
|
+
grep -q "^id = " extension.toml
|
|
126
|
+
grep -q "^name = " extension.toml
|
|
127
|
+
grep -q "^version = " extension.toml
|
|
128
|
+
grep -q "^schema_version = " extension.toml
|
|
129
|
+
echo "extension.toml validation passed"
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
rust_version: "1.96"
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
linux:
|
|
18
|
+
runs-on: ubuntu-22.04
|
|
19
|
+
strategy:
|
|
20
|
+
matrix:
|
|
21
|
+
target: [x86_64, x86, aarch64, armv7]
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v7
|
|
24
|
+
- name: Build wheels
|
|
25
|
+
uses: PyO3/maturin-action@v1
|
|
26
|
+
with:
|
|
27
|
+
target: ${{ matrix.target }}
|
|
28
|
+
args: --release --out dist --find-interpreter
|
|
29
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
30
|
+
manylinux: auto
|
|
31
|
+
- name: Upload wheels
|
|
32
|
+
uses: actions/upload-artifact@v7
|
|
33
|
+
with:
|
|
34
|
+
name: wheels-linux-${{ matrix.target }}
|
|
35
|
+
path: dist
|
|
36
|
+
|
|
37
|
+
musllinux:
|
|
38
|
+
runs-on: ubuntu-22.04
|
|
39
|
+
strategy:
|
|
40
|
+
matrix:
|
|
41
|
+
target: [x86_64, aarch64]
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v7
|
|
44
|
+
- name: Build wheels
|
|
45
|
+
uses: PyO3/maturin-action@v1
|
|
46
|
+
with:
|
|
47
|
+
target: ${{ matrix.target }}
|
|
48
|
+
args: --release --out dist --find-interpreter
|
|
49
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
50
|
+
manylinux: musllinux_1_2
|
|
51
|
+
- name: Upload wheels
|
|
52
|
+
uses: actions/upload-artifact@v7
|
|
53
|
+
with:
|
|
54
|
+
name: wheels-musllinux-${{ matrix.target }}
|
|
55
|
+
path: dist
|
|
56
|
+
|
|
57
|
+
windows:
|
|
58
|
+
runs-on: windows-latest
|
|
59
|
+
strategy:
|
|
60
|
+
matrix:
|
|
61
|
+
target: [x64, x86]
|
|
62
|
+
steps:
|
|
63
|
+
- uses: actions/checkout@v7
|
|
64
|
+
- uses: actions/setup-python@v7
|
|
65
|
+
with:
|
|
66
|
+
python-version: |
|
|
67
|
+
3.10
|
|
68
|
+
3.11
|
|
69
|
+
3.12
|
|
70
|
+
3.13
|
|
71
|
+
3.14
|
|
72
|
+
architecture: ${{ matrix.target }}
|
|
73
|
+
allow-prereleases: true
|
|
74
|
+
- name: Build wheels
|
|
75
|
+
uses: PyO3/maturin-action@v1
|
|
76
|
+
with:
|
|
77
|
+
target: ${{ matrix.target }}
|
|
78
|
+
args: --release --out dist --find-interpreter
|
|
79
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
80
|
+
- name: Upload wheels
|
|
81
|
+
uses: actions/upload-artifact@v7
|
|
82
|
+
with:
|
|
83
|
+
name: wheels-windows-${{ matrix.target }}
|
|
84
|
+
path: dist
|
|
85
|
+
|
|
86
|
+
windows-freethreaded:
|
|
87
|
+
runs-on: windows-latest
|
|
88
|
+
strategy:
|
|
89
|
+
matrix:
|
|
90
|
+
target: [x64, x86]
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/checkout@v7
|
|
93
|
+
- uses: actions/setup-python@v7
|
|
94
|
+
with:
|
|
95
|
+
python-version: "3.14t"
|
|
96
|
+
architecture: ${{ matrix.target }}
|
|
97
|
+
allow-prereleases: true
|
|
98
|
+
- name: Build wheels
|
|
99
|
+
uses: PyO3/maturin-action@v1
|
|
100
|
+
with:
|
|
101
|
+
target: ${{ matrix.target }}
|
|
102
|
+
args: --release --out dist --find-interpreter
|
|
103
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
104
|
+
- name: Upload wheels
|
|
105
|
+
uses: actions/upload-artifact@v7
|
|
106
|
+
with:
|
|
107
|
+
name: wheels-windows-${{ matrix.target }}-freethreaded
|
|
108
|
+
path: dist
|
|
109
|
+
|
|
110
|
+
macos:
|
|
111
|
+
runs-on: ${{ matrix.runner }}
|
|
112
|
+
strategy:
|
|
113
|
+
matrix:
|
|
114
|
+
include:
|
|
115
|
+
- runner: macos-15
|
|
116
|
+
target: x86_64
|
|
117
|
+
- runner: macos-14
|
|
118
|
+
target: aarch64
|
|
119
|
+
steps:
|
|
120
|
+
- uses: actions/checkout@v7
|
|
121
|
+
- uses: actions/setup-python@v7
|
|
122
|
+
with:
|
|
123
|
+
python-version: 3.x
|
|
124
|
+
allow-prereleases: true
|
|
125
|
+
- name: Build wheels
|
|
126
|
+
uses: PyO3/maturin-action@v1
|
|
127
|
+
with:
|
|
128
|
+
target: ${{ matrix.target }}
|
|
129
|
+
args: --release --out dist --find-interpreter
|
|
130
|
+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
131
|
+
- name: Upload wheels
|
|
132
|
+
uses: actions/upload-artifact@v7
|
|
133
|
+
with:
|
|
134
|
+
name: wheels-macos-${{ matrix.target }}
|
|
135
|
+
path: dist
|
|
136
|
+
|
|
137
|
+
sdist:
|
|
138
|
+
runs-on: ubuntu-latest
|
|
139
|
+
steps:
|
|
140
|
+
- uses: actions/checkout@v7
|
|
141
|
+
- name: Build sdist
|
|
142
|
+
uses: PyO3/maturin-action@v1
|
|
143
|
+
with:
|
|
144
|
+
command: sdist
|
|
145
|
+
args: --out dist
|
|
146
|
+
- name: Upload sdist
|
|
147
|
+
uses: actions/upload-artifact@v7
|
|
148
|
+
with:
|
|
149
|
+
name: wheels-sdist
|
|
150
|
+
path: dist
|
|
151
|
+
|
|
152
|
+
build-binaries:
|
|
153
|
+
name: Build standalone binaries
|
|
154
|
+
runs-on: ${{ matrix.os }}
|
|
155
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
156
|
+
strategy:
|
|
157
|
+
matrix:
|
|
158
|
+
include:
|
|
159
|
+
- os: ubuntu-latest
|
|
160
|
+
target: x86_64-unknown-linux-gnu
|
|
161
|
+
binary_name: konform-x86_64-unknown-linux-gnu
|
|
162
|
+
- os: ubuntu-latest
|
|
163
|
+
target: aarch64-unknown-linux-gnu
|
|
164
|
+
binary_name: konform-aarch64-unknown-linux-gnu
|
|
165
|
+
- os: macos-15
|
|
166
|
+
target: x86_64-apple-darwin
|
|
167
|
+
binary_name: konform-x86_64-apple-darwin
|
|
168
|
+
- os: macos-14
|
|
169
|
+
target: aarch64-apple-darwin
|
|
170
|
+
binary_name: konform-aarch64-apple-darwin
|
|
171
|
+
- os: windows-latest
|
|
172
|
+
target: x86_64-pc-windows-msvc
|
|
173
|
+
binary_name: konform-x86_64-pc-windows-msvc.exe
|
|
174
|
+
steps:
|
|
175
|
+
- uses: actions/checkout@v7
|
|
176
|
+
- name: Install Rust
|
|
177
|
+
uses: dtolnay/rust-toolchain@master
|
|
178
|
+
with:
|
|
179
|
+
toolchain: ${{ env.rust_version }}
|
|
180
|
+
targets: ${{ matrix.target }}
|
|
181
|
+
- name: Cache Rust dependencies
|
|
182
|
+
uses: Swatinem/rust-cache@v2
|
|
183
|
+
with:
|
|
184
|
+
shared-key: "build-binaries-${{ matrix.target }}"
|
|
185
|
+
- name: Install cross-compilation tools (Linux ARM64)
|
|
186
|
+
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
|
187
|
+
run: |
|
|
188
|
+
sudo apt-get update
|
|
189
|
+
sudo apt-get install -y gcc-aarch64-linux-gnu
|
|
190
|
+
- name: Build binary
|
|
191
|
+
env:
|
|
192
|
+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
|
|
193
|
+
run: cargo build --release --target ${{ matrix.target }}
|
|
194
|
+
- name: Rename binary (Unix)
|
|
195
|
+
if: runner.os != 'Windows'
|
|
196
|
+
run: mv target/${{ matrix.target }}/release/konform target/${{ matrix.target }}/release/${{ matrix.binary_name }}
|
|
197
|
+
- name: Rename binary (Windows)
|
|
198
|
+
if: runner.os == 'Windows'
|
|
199
|
+
run: move target\${{ matrix.target }}\release\konform.exe target\${{ matrix.target }}\release\${{ matrix.binary_name }}
|
|
200
|
+
- name: Upload binary
|
|
201
|
+
uses: actions/upload-artifact@v7
|
|
202
|
+
with:
|
|
203
|
+
name: binary-${{ matrix.target }}
|
|
204
|
+
path: target/${{ matrix.target }}/release/${{ matrix.binary_name }}
|
|
205
|
+
|
|
206
|
+
release:
|
|
207
|
+
name: Release
|
|
208
|
+
runs-on: ubuntu-latest
|
|
209
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
210
|
+
needs:
|
|
211
|
+
[
|
|
212
|
+
linux,
|
|
213
|
+
musllinux,
|
|
214
|
+
windows,
|
|
215
|
+
windows-freethreaded,
|
|
216
|
+
macos,
|
|
217
|
+
sdist,
|
|
218
|
+
build-binaries,
|
|
219
|
+
]
|
|
220
|
+
permissions:
|
|
221
|
+
id-token: write
|
|
222
|
+
contents: write
|
|
223
|
+
attestations: write
|
|
224
|
+
steps:
|
|
225
|
+
- uses: actions/checkout@v7
|
|
226
|
+
|
|
227
|
+
- name: Download wheel artifacts
|
|
228
|
+
uses: actions/download-artifact@v8
|
|
229
|
+
with:
|
|
230
|
+
pattern: wheels-*
|
|
231
|
+
path: wheels
|
|
232
|
+
|
|
233
|
+
- name: Download standalone binaries
|
|
234
|
+
uses: actions/download-artifact@v8
|
|
235
|
+
with:
|
|
236
|
+
pattern: binary-*
|
|
237
|
+
path: binaries
|
|
238
|
+
|
|
239
|
+
- name: Generate artifact attestation
|
|
240
|
+
uses: actions/attest-build-provenance@v4
|
|
241
|
+
with:
|
|
242
|
+
subject-path: "wheels/*/*.whl"
|
|
243
|
+
|
|
244
|
+
- name: Flatten wheels directory
|
|
245
|
+
run: |
|
|
246
|
+
mkdir -p dist
|
|
247
|
+
find wheels -name "*.whl" -exec cp {} dist/ \;
|
|
248
|
+
find wheels -name "*.tar.gz" -exec cp {} dist/ \;
|
|
249
|
+
ls -lh dist/
|
|
250
|
+
|
|
251
|
+
- name: Flatten binaries directory
|
|
252
|
+
run: |
|
|
253
|
+
mkdir -p binaries-dist
|
|
254
|
+
find binaries -type f -name "konform*" -exec cp {} binaries-dist/ \;
|
|
255
|
+
chmod +x binaries-dist/* || true
|
|
256
|
+
ls -lh binaries-dist/
|
|
257
|
+
|
|
258
|
+
- name: Create GitHub Release
|
|
259
|
+
uses: softprops/action-gh-release@v3
|
|
260
|
+
with:
|
|
261
|
+
files: |
|
|
262
|
+
dist/*.whl
|
|
263
|
+
dist/*.tar.gz
|
|
264
|
+
binaries-dist/*
|
|
265
|
+
generate_release_notes: true
|
|
266
|
+
fail_on_unmatched_files: true
|
|
267
|
+
|
|
268
|
+
- name: Publish to PyPI
|
|
269
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
270
|
+
with:
|
|
271
|
+
skip-existing: true
|
|
272
|
+
verbose: true
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
name: Security Audit
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
schedule:
|
|
9
|
+
# Run security audit daily at 00:00 UTC
|
|
10
|
+
- cron: "0 0 * * *"
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
CARGO_TERM_COLOR: always
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
security-audit:
|
|
18
|
+
name: Security Audit
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
security-events: write
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v7
|
|
25
|
+
|
|
26
|
+
- name: Install Rust
|
|
27
|
+
uses: dtolnay/rust-toolchain@stable
|
|
28
|
+
|
|
29
|
+
- name: Cache Rust dependencies
|
|
30
|
+
uses: Swatinem/rust-cache@v2
|
|
31
|
+
with:
|
|
32
|
+
shared-key: "security-audit"
|
|
33
|
+
|
|
34
|
+
- name: Install cargo-audit
|
|
35
|
+
uses: taiki-e/install-action@v2.87.1
|
|
36
|
+
with:
|
|
37
|
+
tool: cargo-audit
|
|
38
|
+
|
|
39
|
+
- name: Run cargo audit
|
|
40
|
+
run: cargo audit --json | tee audit-results.json
|
|
41
|
+
|
|
42
|
+
- name: Check for vulnerabilities
|
|
43
|
+
run: |
|
|
44
|
+
if cargo audit; then
|
|
45
|
+
echo "✅ No critical vulnerabilities found"
|
|
46
|
+
else
|
|
47
|
+
echo "❌ Vulnerabilities detected — see output above"
|
|
48
|
+
exit 1
|
|
49
|
+
fi
|
|
50
|
+
|
|
51
|
+
- name: Upload audit results
|
|
52
|
+
if: always()
|
|
53
|
+
uses: actions/upload-artifact@v7
|
|
54
|
+
with:
|
|
55
|
+
name: security-audit-results
|
|
56
|
+
path: audit-results.json
|
|
57
|
+
|
|
58
|
+
cargo-deny:
|
|
59
|
+
name: Cargo Deny
|
|
60
|
+
runs-on: ubuntu-latest
|
|
61
|
+
permissions:
|
|
62
|
+
contents: read
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@v7
|
|
65
|
+
|
|
66
|
+
- name: Run cargo deny
|
|
67
|
+
uses: EmbarkStudios/cargo-deny-action@v2
|
|
68
|
+
with:
|
|
69
|
+
log-level: warn
|
|
70
|
+
command: check
|
|
71
|
+
arguments: --all-features
|
|
72
|
+
|
|
73
|
+
dependency-review:
|
|
74
|
+
name: Dependency Review
|
|
75
|
+
runs-on: ubuntu-latest
|
|
76
|
+
if: github.event_name == 'pull_request' && github.repository_owner != 'benediktziegler' # Disable for this repo
|
|
77
|
+
permissions:
|
|
78
|
+
contents: read
|
|
79
|
+
pull-requests: write
|
|
80
|
+
steps:
|
|
81
|
+
- uses: actions/checkout@v7
|
|
82
|
+
|
|
83
|
+
- name: Dependency Review
|
|
84
|
+
uses: actions/dependency-review-action@v5
|
|
85
|
+
with:
|
|
86
|
+
config-file: "./.github/dependency-review-config.yml"
|
konform-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Rust
|
|
2
|
+
target/
|
|
3
|
+
|
|
4
|
+
# IDEs
|
|
5
|
+
.vscode/
|
|
6
|
+
.idea/
|
|
7
|
+
*.swp
|
|
8
|
+
*.swo
|
|
9
|
+
|
|
10
|
+
# OS
|
|
11
|
+
.DS_Store
|
|
12
|
+
Thumbs.db
|
|
13
|
+
|
|
14
|
+
# Environment / Secrets
|
|
15
|
+
.env
|
|
16
|
+
.secret
|
|
17
|
+
*.local
|
|
18
|
+
|
|
19
|
+
# Logs and Temporary files
|
|
20
|
+
tmp/
|
|
21
|
+
*.log
|
|
22
|
+
*.tmp
|
|
23
|
+
dist/
|
|
24
|
+
|
|
25
|
+
# Konform specific cache
|
|
26
|
+
.konform_cache/
|
|
27
|
+
|
|
28
|
+
# Python
|
|
29
|
+
.coverage
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
default_install_hook_types:
|
|
2
|
+
- pre-commit
|
|
3
|
+
- commit-msg
|
|
4
|
+
|
|
5
|
+
default_stages:
|
|
6
|
+
- pre-commit
|
|
7
|
+
|
|
8
|
+
repos:
|
|
9
|
+
- repo: local
|
|
10
|
+
hooks:
|
|
11
|
+
- id: format
|
|
12
|
+
name: Code format
|
|
13
|
+
language: system
|
|
14
|
+
entry: cargo fmt
|
|
15
|
+
pass_filenames: false
|
|
16
|
+
verbose: false
|
|
17
|
+
- id: check
|
|
18
|
+
name: Cargo check
|
|
19
|
+
language: system
|
|
20
|
+
entry: cargo check
|
|
21
|
+
pass_filenames: false
|
|
22
|
+
verbose: false
|
|
23
|
+
|
|
24
|
+
- repo: https://github.com/commitizen-tools/commitizen
|
|
25
|
+
rev: v3.29.1
|
|
26
|
+
hooks:
|
|
27
|
+
- id: commitizen
|
|
28
|
+
stages: [commit-msg]
|
|
29
|
+
|
|
30
|
+
- repo: meta
|
|
31
|
+
hooks:
|
|
32
|
+
- id: check-hooks-apply
|
|
33
|
+
- id: check-useless-excludes
|
|
34
|
+
|
|
35
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
36
|
+
rev: v6.0.0
|
|
37
|
+
hooks:
|
|
38
|
+
- id: trailing-whitespace
|
|
39
|
+
- id: end-of-file-fixer
|
|
40
|
+
- id: check-toml
|
|
41
|
+
- id: check-yaml
|
|
42
|
+
- id: check-added-large-files
|
|
43
|
+
- id: detect-private-key
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## 0.1.0 (2026-09-02)
|
|
2
|
+
|
|
3
|
+
### Feat
|
|
4
|
+
|
|
5
|
+
- **config**: add aliases for noqa rule codes
|
|
6
|
+
- **kis001**: add unresolved import warning level config
|
|
7
|
+
- switch Python AST parser from rustpython-parser to ruff_python_parser
|
|
8
|
+
- add Zed editor extension
|
|
9
|
+
- add CLI, LSP server and main entry point
|
|
10
|
+
- add KPT user-defined pattern-matching rule
|
|
11
|
+
- add rule engine and KIS001 module-only import checker
|
|
12
|
+
- add config loader and git changed-file detection
|
|
13
|
+
- add core types, theme, module probe and file cache
|
|
14
|
+
|
|
15
|
+
### Fix
|
|
16
|
+
|
|
17
|
+
- update lsp-server Response field for 0.10.0
|
|
18
|
+
- normalize walked python file paths
|
|
19
|
+
- **module_probe**: handle cwd sys.path and cache race
|
|
20
|
+
- improve cache invalidation
|
|
21
|
+
|
|
22
|
+
### Refactor
|
|
23
|
+
|
|
24
|
+
- **main**: remove python wrapper and migrate to pure Rust binary
|