Skip to content

Commit 35cd72a

Browse files
Boilerplate, CI (#15)
* chore(markdown): simple canonicalisation changes * chore(libpath): prepare 0.0.3 release baseline * Added complete package metadata, crate documentation, and CI checks; * Added reproducible pinned-nightly formatting and repository checkers; * Added locked dependency resolution and updated compatible test support; * Documented current Unix and Windows classification APIs; * Preserved unfinished path semantics in TODO.md; * Bumped package and installation references to 0.0.3; * Recorded the 0.0.3 release in CHANGES.md and NEWS.md;
1 parent 64f2be1 commit 35cd72a

17 files changed

Lines changed: 853 additions & 70 deletions

File tree

‎.cargo/config.toml‎

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

‎.github/workflows/ci.yml‎

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- dev
8+
- boilerplate
9+
- idiomatic
10+
- rc1
11+
- rc2
12+
- rc3
13+
pull_request:
14+
15+
permissions:
16+
contents: read
17+
18+
defaults:
19+
run:
20+
shell: bash
21+
22+
env:
23+
CARGO_TERM_COLOR: always
24+
25+
jobs:
26+
check:
27+
name: Stable checks
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- uses: dtolnay/rust-toolchain@stable
33+
with:
34+
components: clippy
35+
36+
- uses: Swatinem/rust-cache@v2
37+
38+
- name: cargo test (all targets)
39+
run: cargo test --all-targets --locked
40+
41+
- name: cargo test (no default features)
42+
run: cargo test --no-default-features --locked
43+
44+
- name: cargo clippy
45+
run: cargo clippy --all-targets --locked -- -D warnings
46+
47+
- name: cargo doc
48+
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --locked
49+
50+
- name: Install pinned nightly rustfmt
51+
run: rustup toolchain install nightly-2026-08-08 --profile minimal --component rustfmt
52+
53+
- name: rustfmt
54+
run: ./scripts/fmt --check
55+
56+
- name: DOC_76 checker
57+
run: python3 scripts/check_doc_76.py
58+
59+
- name: RUST_TEST_NAMING checker
60+
run: python3 scripts/check_test_names.py
61+
62+
- name: DERIVE_LAYOUT checker
63+
run: python3 scripts/check_derives.py
64+
65+
- name: cargo build (libver)
66+
run: cargo build --bin libver --locked
67+
68+
- name: cargo publish (dry run)
69+
run: cargo publish --dry-run --locked
70+
71+
path-semantics:
72+
name: Path semantics (${{ matrix.os }})
73+
runs-on: ${{ matrix.os }}
74+
strategy:
75+
fail-fast: false
76+
matrix:
77+
os:
78+
- ubuntu-latest
79+
- windows-latest
80+
steps:
81+
- uses: actions/checkout@v4
82+
83+
- uses: dtolnay/rust-toolchain@stable
84+
85+
- uses: Swatinem/rust-cache@v2
86+
87+
- name: cargo test (Unix path semantics)
88+
run: cargo test --lib --locked tests::unix::
89+
90+
- name: cargo test (Windows path semantics)
91+
run: cargo test --lib --locked tests::windows::
92+
93+
msrv:
94+
name: MSRV (1.74)
95+
runs-on: ubuntu-latest
96+
steps:
97+
- uses: actions/checkout@v4
98+
99+
- uses: dtolnay/rust-toolchain@1.74.0
100+
101+
- uses: Swatinem/rust-cache@v2
102+
103+
- name: cargo check (library)
104+
run: cargo check --lib --locked

‎.gitignore‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
.DS_Store
1414

15-
Cargo.lock
16-
1715

1816
# files (by pattern)
1917

‎.vimrc‎

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,70 @@
1+
" Synesis C/C++ project .vimrc — aligned with .sis/.vscode/c_cxx/settings.json
12

3+
set nocompatible
4+
filetype indent plugin on
5+
syntax enable
26
set autoindent
3-
set expandtab
4-
set shiftwidth=4
5-
set softtabstop=4
6-
set tabstop=4
7+
set backspace=indent,eol,start
8+
set hlsearch
9+
set incsearch
10+
set number
11+
12+
" files.insertFinalNewline
13+
set eol
14+
set fixeol
15+
16+
" editor.renderWhitespace: all
17+
set list
18+
set listchars=tab:->,trail:-,extends:>,precedes:<,nbsp:+
19+
20+
" editor.detectIndentation: false — global defaults (editor.tabSize: 2, insertSpaces: false)
21+
set tabstop=2
22+
set shiftwidth=2
23+
set softtabstop=2
24+
set noexpandtab
25+
set colorcolumn=76
26+
27+
" colorcolumn draws a full-column tint in Vim (not a VS Code-style 1px line).
28+
" Keep it subtle via the ColorColumn highlight group; reapply after colorscheme changes.
29+
if has('termguicolors')
30+
" set termguicolors
31+
endif
32+
33+
function! s:ConfigureColorColumn() abort
34+
highlight ColorColumn ctermbg=236 guibg=#2a2a2a cterm=NONE gui=NONE
35+
endfunction
36+
37+
call s:ConfigureColorColumn()
38+
autocmd ColorScheme * call s:ConfigureColorColumn()
39+
40+
" files.trimTrailingWhitespace
41+
autocmd BufWritePre * %s/\s\+$//e
42+
43+
augroup sis_c_cxx
44+
autocmd!
45+
46+
" [c] / [cpp]
47+
autocmd FileType c,cpp setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,64,68,72,76
48+
49+
" [rust]
50+
autocmd FileType rs setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=76
51+
52+
" [cmake]
53+
autocmd FileType cmake setlocal noexpandtab tabstop=4 shiftwidth=4 softtabstop=4
54+
55+
" [shellscript]
56+
autocmd FileType sh,bash,zsh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 colorcolumn=60,76
57+
58+
" [bat]
59+
autocmd FileType bat,dosbatch setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76
60+
61+
" [json] / [markdown] / [yaml] / [ruby]
62+
autocmd FileType json,markdown,yaml,ruby setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
63+
64+
" [python]
65+
autocmd FileType python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 colorcolumn=60,76
66+
67+
" [toml]
68+
autocmd FileType toml setlocal noexpandtab tabstop=2 shiftwidth=2 softtabstop=2
69+
augroup END
70+

‎CHANGES.md‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
# libpath.Rust - CHANGES <!-- omit in toc -->
1+
# libpath.Rust - Changes <!-- omit in toc -->
2+
3+
4+
## 0.0.3 - 31st August 2026
5+
6+
* Added complete package metadata, release documentation, and CI checks;
7+
* Added reproducible pinned-nightly formatting and repository checkers;
8+
* Updated **fastparse** and **test_help-rs** to current compatible releases;
9+
* Documented the current public API and retained unfinished path semantics in **TODO.md**;
210

311

412
## 0.0.2 - 16th March 2025
513

6-
* ~ renamed `ClassificationResult#Entry` => `#EntryName`;
7-
* + added **test/scratch/libver**;
8-
* ~ tidying ; + adding in as much of 2024 work's tests as work with current definition;
9-
* + added **CHANGES.md**, **NEWS.md**, and **TODO.md**;
14+
* Renamed `ClassificationResult#Entry` to `#EntryName`;
15+
* Added **test/scratch/libver**;
16+
* Tidied the source and added compatible tests from the 2024 work;
17+
* Added **CHANGES.md**, **NEWS.md**, and **TODO.md**;
18+
1019

1120

1221
## 0.0.1 - 5th April 2024
1322

14-
* initial version;
23+
* Initial version;
1524

1625

1726
All history before this day is moot!

‎Cargo.lock‎

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

‎Cargo.toml‎

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,33 @@
77
authors = [
88
"Matt Wilson <matthew@synesis.com.au>",
99
]
10-
description = "Path parsing library (for Rust)"
10+
categories = [
11+
"filesystem",
12+
"parsing",
13+
]
14+
description = "Path parsing library for Rust"
15+
documentation = "https://docs.rs/libpath"
1116
edition = "2021"
12-
repository = "https://github.com/synesissoftware/libpath.Rust"
17+
exclude = [
18+
".cargo",
19+
".github",
20+
".vimrc",
21+
".vscode",
22+
"scripts",
23+
"target",
24+
]
25+
homepage = "https://github.com/synesissoftware/libpath.Rust"
26+
keywords = [
27+
"filesystem",
28+
"parsing",
29+
"path",
30+
]
1331
license = "BSD-3-Clause"
1432
name = "libpath"
1533
readme = "README.md"
16-
version = "0.0.2"
34+
repository = "https://github.com/synesissoftware/libpath.Rust"
35+
rust-version = "1.74"
36+
version = "0.0.3"
1737

1838

1939
# ##########################################################
@@ -53,13 +73,13 @@ null-feature = []
5373

5474
[dependencies]
5575

56-
fastparse = { version = "~0.0", default-features = false, features = [
76+
fastparse = { version = "0.0.3", default-features = false, features = [
5777
] }
5878

5979

6080
[dev-dependencies]
6181

62-
test_help-rs = { version = "0.1" }
82+
test_help-rs = { version = "0.2.1" }
6383

6484

6585
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

‎LICENSE‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
libpath.Rust - BSD 3-Clause License
22

3-
Copyright (c) 2019-2024, Matthew Wilson and Synesis Information Systems
3+
Copyright (c) 2019-2026, Matthew Wilson and Synesis Information Systems
44
Copyright (c) 2012-2019, Matthew Wilson and Synesis Software
55
All rights reserved.
66

‎NEWS.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# libpath.Rust - NEWS <!-- omit in toc -->
1+
# libpath.Rust - News <!-- omit in toc -->
22

33
| Date | News Item |
44
| --------------------- | ----------------------------------------- |
5+
| 31st August 2026 | [libpath.Rust 0.0.3](https://github.com/synesissoftware/libpath.Rust/releases/tag/0.0.3) released |
56
| 16th March 2025 | libpath.Rust 0.0.2 released |
67
| 5th April 2024 | libpath.Rust 0.0.1 released |
78

0 commit comments

Comments
 (0)