Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: docs

on:
push:
branches:
- main
paths:
- 'docs/**'
- 'book.toml'

# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false

# Required permissions for GitHub Pages deployment
permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Install mdBook
run: |
mkdir -p $HOME/.local/bin
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.5.2/mdbook-v0.5.2-x86_64-unknown-linux-gnu.tar.gz \
| tar -xz --directory=$HOME/.local/bin
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Build docs
run: mdbook build

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: book/

deploy:
needs: build
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
10 changes: 10 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ on:
push:
branches:
- "main"
paths:
- ".github/workflows/**"
- ".clang-format"
- ".clang-tidy"
- "src/**"
- "extern/**"
- "test/**"
- "CMakeLists.txt"
- "Dockerfile.glibc"
- "Dockerfile.musl"

concurrency:
group: prerelease
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
name: Pull Request

on:
pull_request
pull_request:
paths:
- ".github/workflows/**"
- ".clang-format"
- ".clang-tidy"
- "src/**"
- "extern/**"
- "test/**"
- "CMakeLists.txt"
- "Dockerfile.glibc"
- "Dockerfile.musl"

permissions:
contents: write
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Contributions are welcome. Please read the guidelines below before opening a pul

If you are unsure whether a feature fits the project, or whether an existing tool could already be combined with `mpqcli` to achieve the same result, open an issue first. This avoids wasted effort and keeps the project focused.

**mpqcli follows the Unix philosophy.** The tool is designed to do one thing well and to compose with other tools via pipes and redirection. If you find yourself wanting to add functionality that could be handled by a separate tool for example, sorting the output of `list` the right answer is usually to pipe the output to that tool rather than adding it here.
**mpqcli follows the Unix philosophy.** The tool is designed to do one thing well and to compose with other tools via pipes and redirection. If you find yourself wanting to add functionality that could be handled by a separate tool - for example, sorting the output of `list` - the right answer is usually to pipe the output to that tool rather than adding it here.

## Prerequisites and Setup

Expand Down Expand Up @@ -68,7 +68,7 @@ All tests must pass without errors.

### 3. New features should include tests

If your change adds or modifies user-facing functionality such as a new subcommand flag or a change in output format please include a corresponding test in the `test/` directory. The existing test files (`test_list.py`, `test_add.py`, etc.) are good references for the test style and fixtures used.
If your change adds or modifies user-facing functionality - such as a new subcommand flag or a change in output format - please include a corresponding test in the `test/` directory. The existing test files (`test_list.py`, `test_add.py`, etc.) are good references for the test style and fixtures used.

### 4. Linting must pass

Expand All @@ -94,7 +94,7 @@ C++ formatting is enforced by `.clang-format` (Google style base). Static analys

Suppressions are occasionally necessary for third-party code or intentional patterns. When suppressing a clang-tidy warning:

- Use `// NOLINT(check-name)` with the specific check name bare `// NOLINT` is not acceptable
- Use `// NOLINT(check-name)` with the specific check name - bare `// NOLINT` is not acceptable
- Every suppression must have a comment explaining why it is justified

```cpp
Expand All @@ -116,7 +116,7 @@ if (flags & MPQ_FILE_COMPRESS) result += 'c';

### StormLib locale state is global and not thread-safe

`SFileSetLocale` sets a process-wide locale variable (`g_lcFileLocale`) inside StormLib. All locale-sensitive operations in `mpq.cpp` file open, add, remove, read, extract, and list call `SFileSetLocale` immediately before the relevant StormLib call. There is no locale-explicit alternative in StormLib's public API (`SFileOpenFileEx`, `SFileAddFileEx`, etc. all read `g_lcFileLocale` internally).
`SFileSetLocale` sets a process-wide locale variable (`g_lcFileLocale`) inside StormLib. All locale-sensitive operations in `mpq.cpp` - file open, add, remove, read, extract, and list - call `SFileSetLocale` immediately before the relevant StormLib call. There is no locale-explicit alternative in StormLib's public API (`SFileOpenFileEx`, `SFileAddFileEx`, etc. all read `g_lcFileLocale` internally).

This means:

Expand Down
Loading