Skip to content

Commit 244c672

Browse files
authored
Refactor files (#38)
This is intended to allow calling both rust lib and python lib "cpp-linter" when installing with cargo or pip.
1 parent 4f9b912 commit 244c672

Some content is hidden

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

67 files changed

+1069
-1070
lines changed

.github/workflows/binary-builds.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
run: >-
110110
${{ matrix.cross && 'cross' || 'cargo '}}
111111
build
112-
--manifest-path cpp-linter-lib/Cargo.toml
112+
--manifest-path cpp-linter/Cargo.toml
113113
--bin cpp-linter
114114
--release
115115
--target ${{ matrix.target }}

.github/workflows/build-docs.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ jobs:
3434
- name: Install mdbook
3535
uses: taiki-e/install-action@v2
3636
with:
37-
tool: mdbook,cargo-binstall
37+
tool: mdbook,cargo-binstall,just
3838
- name: Install mdbook plugins
3939
run: cargo binstall -y mdbook-alerts
4040
- name: Build book
41-
run: mdbook build docs
41+
run: just docs-build
4242
- name: Upload docs build as artifact
4343
uses: actions/upload-artifact@v4
4444
with:
@@ -63,7 +63,11 @@ jobs:
6363
with:
6464
path: ~/.cargo
6565
key: ${{ runner.os }}-docs-cargo-${{ hashFiles('Cargo.lock') }}
66-
- run: cargo doc --no-deps --manifest-path cpp-linter-lib/Cargo.toml
66+
- name: Install mdbook
67+
uses: taiki-e/install-action@v2
68+
with:
69+
tool: just
70+
- run: just docs-rs
6771
- name: upload rustdoc build as artifact
6872
uses: actions/upload-artifact@v4
6973
with:

.github/workflows/python-packaging.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
uses: PyO3/maturin-action@v1
5454
with:
5555
target: ${{ matrix.target }}
56-
args: --manifest-path cpp-linter-py/Cargo.toml --release --out dist --find-interpreter ${{ steps.is-openssl-vendored.outputs.enabled }}
56+
args: --manifest-path py-binding/Cargo.toml --release --out dist --find-interpreter ${{ steps.is-openssl-vendored.outputs.enabled }}
5757
manylinux: auto
5858
before-script-linux: |
5959
case "${{ matrix.target }}" in
@@ -90,7 +90,7 @@ jobs:
9090
uses: PyO3/maturin-action@v1
9191
with:
9292
target: ${{ matrix.target }}
93-
args: --manifest-path cpp-linter-py/Cargo.toml --release --out dist --find-interpreter
93+
args: --manifest-path py-binding/Cargo.toml --release --out dist --find-interpreter
9494
- name: Upload wheels
9595
uses: actions/upload-artifact@v4
9696
with:
@@ -112,7 +112,7 @@ jobs:
112112
uses: PyO3/maturin-action@v1
113113
with:
114114
target: ${{ matrix.target }}
115-
args: --manifest-path cpp-linter-py/Cargo.toml --release --out dist --find-interpreter --features openssl-vendored
115+
args: --manifest-path py-binding/Cargo.toml --release --out dist --find-interpreter --features openssl-vendored
116116
- name: Upload wheels
117117
uses: actions/upload-artifact@v4
118118
with:
@@ -127,7 +127,7 @@ jobs:
127127
uses: PyO3/maturin-action@v1
128128
with:
129129
command: sdist
130-
args: --manifest-path cpp-linter-py/Cargo.toml --out dist
130+
args: --manifest-path py-binding/Cargo.toml --out dist
131131
- name: Upload sdist
132132
uses: actions/upload-artifact@v4
133133
with:

.github/workflows/run-dev-tests.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,9 @@ jobs:
214214

215215
- name: Generate Coverage lcov report
216216
if: runner.os == 'Linux'
217-
run: just lcov
217+
run: |
218+
rm coverage.json
219+
just lcov
218220
219221
- uses: codecov/codecov-action@v4
220222
if: runner.os == 'Linux'

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repos:
33
rev: v4.6.0
44
hooks:
55
- id: trailing-whitespace
6-
exclude: cpp-linter-lib/tests/.*\.(?:patch|diff)
6+
exclude: cpp-linter/tests/.*\.(?:patch|diff)
77
- id: end-of-file-fixer
88
- id: check-docstring-first
99
- id: check-added-large-files

Cargo.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
22

33
[workspace]
4-
members = ["cpp-linter-lib", "cpp-linter-py", "docs"]
4+
members = ["cpp-linter", "py-binding", "docs"]
55
resolver = "2"
66

77
[workspace.package]

0 commit comments

Comments
 (0)