Skip to content

Commit 73f0988

Browse files
committed
Refactor repo's files
This is intended to allow calling both rust lib and python lib "cpp-linter" when installing with cargo or pip. Also when using python, the entry point script is now the same as it is in v1.x: `cpp_linter.main()`.
1 parent 4f9b912 commit 73f0988

Some content is hidden

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

63 files changed

+69
-108
lines changed

.github/workflows/binary-builds.yml

Lines changed: 1 addition & 1 deletion
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

Lines changed: 7 additions & 3 deletions
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

Lines changed: 3 additions & 3 deletions
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:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
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]

cpp-linter-py/cpp_linter/__init__.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

cpp-linter-py/cpp_linter/entry_point.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

cpp-linter-py/src/lib.rs

Lines changed: 0 additions & 25 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)