Opinionated code formatter for C++ code.
Project description
WFormat
Opinionated code formatter for C++ code.
Availability
limit: only support Format Document in IDEs for now
Visual Studio Code
- win-x64
- win-arm64
- macos
- linux-64
- linux-arm64
Visual Studio
- win-x64
- win-arm64
XCode
- macos
Python Package Index(PyPI)
- win-x64
- win-arm64
- macos
- linux-64
- linux-arm64
Tutorials
Use Visual Studio Code Extension
Install wformat from extension market
In any C++ file, Press ctrl + alt + P to bring up the command menu
Type Format Document With... select Config Default Formatter... pick wformat
Next time you call Format Document, vscode will use wformat
Use Visual Studio Extension
Install wformat from extension market
By default, you can only click Run WFormat in your Right Click Menu to format on the file
You can find wformat.General(or search wformat) in Tools > Options menu
By change Override default formatter to True, you can use Format Document(ctrl + K, ctrl + D) with wformat instead
Use as console app from Python Package Index (PyPI)
Run pip install wformat
Run wformat or wformat -h to access the docs
> wformat
overview: Opinionated code formatter for C++ code
usage: wformat [-h] [-a] [-d DIR] [-m] [-s] [-c COMMITS] [--check] [--serial] [--ls] [--stdin] [--serve] [paths ...]
tutorials:
format all under the current folder: (-a/--all)
wformat -a
→ Recursively formats all C/C++ files under the current folder.
format all under the given folder: (-d/--dir)
wformat -d path/to/folder
→ Recursively formats all C/C++ files under path/to/folder.
format modified: (-m/--modified)
wformat -m
→ Formats the modified files(not including staged) in your Git repository.
format staged: (-s/--staged)
wformat -s
→ Formats the staged files in your Git repository.
format last N commits: (-c/--commits)
wformat -c N
→ Formats files from last N commits in your Git repository.
positional arguments:
paths All file paths to be formatted
options:
-h, --help show this help message and exit
-a, --all Run auto format on all files which is child of current path.
-d, --dir DIR Run on file under which directory.
-m, --modified Run auto format on modified but not staged files in git.
-s, --staged Run auto format on staged files in git.
-c, --commits COMMITS
Run auto format on all files modified in the last N commits.
--check Only check the format correctness without changing files.
--serial Run in serial mode or not. By default, script will use multi threading.
--ls List all the files that matched given criteria to process and quit without processing them.
--stdin Read code from stdin and write formatted code to stdout (no banners).
--serve Run a persistent stdio server (JSON Lines) for IDE integration.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wformat-0.1.1-py3-none-win_amd64.whl.
File metadata
- Download URL: wformat-0.1.1-py3-none-win_amd64.whl
- Upload date:
- Size: 9.7 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab1ba93af9d73a40f022512353b1a96b77ac745d15998986bd35723ffe2ef613
|
|
| MD5 |
54ec1fd010358e7667ac7d2d2537e161
|
|
| BLAKE2b-256 |
fa7d32d661198d507b01cba56c6c578e24b9ba33770783ad94b5596f55b5f332
|
Provenance
The following attestation bundles were made for wformat-0.1.1-py3-none-win_amd64.whl:
Publisher:
publish-to-pypi.yml on Ziwei-Wei/wformat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wformat-0.1.1-py3-none-win_amd64.whl -
Subject digest:
ab1ba93af9d73a40f022512353b1a96b77ac745d15998986bd35723ffe2ef613 - Sigstore transparency entry: 430219206
- Sigstore integration time:
-
Permalink:
Ziwei-Wei/wformat@d8384222da5cf204087fd9f21da5d355fde1d470 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Ziwei-Wei
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@d8384222da5cf204087fd9f21da5d355fde1d470 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file wformat-0.1.1-py3-none-win32.whl.
File metadata
- Download URL: wformat-0.1.1-py3-none-win32.whl
- Upload date:
- Size: 9.7 MB
- Tags: Python 3, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a32b1f94a3d0390c4ac1557ac0cdf4cca7de1b13fabebfde4505a05195940308
|
|
| MD5 |
aa3e107d17fd4463b95e8b22cf6dc28b
|
|
| BLAKE2b-256 |
c4f7020e74a1036e92d185d7ca1febd7e1c30013b4ca5b138f8942fc09432323
|
Provenance
The following attestation bundles were made for wformat-0.1.1-py3-none-win32.whl:
Publisher:
publish-to-pypi.yml on Ziwei-Wei/wformat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wformat-0.1.1-py3-none-win32.whl -
Subject digest:
a32b1f94a3d0390c4ac1557ac0cdf4cca7de1b13fabebfde4505a05195940308 - Sigstore transparency entry: 430219225
- Sigstore integration time:
-
Permalink:
Ziwei-Wei/wformat@d8384222da5cf204087fd9f21da5d355fde1d470 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Ziwei-Wei
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@d8384222da5cf204087fd9f21da5d355fde1d470 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file wformat-0.1.1-py3-none-macosx_15_0_arm64.whl.
File metadata
- Download URL: wformat-0.1.1-py3-none-macosx_15_0_arm64.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3, macOS 15.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcfdac3908c24378490d2c3111ffd6164ab20c1604f73704ef870707130cf42a
|
|
| MD5 |
14ab109bd586eddbcacd4e7e7e9e3597
|
|
| BLAKE2b-256 |
9af3f209a39da8c10885f96db81a48668ce583f042ead9301287965aad1f611c
|
Provenance
The following attestation bundles were made for wformat-0.1.1-py3-none-macosx_15_0_arm64.whl:
Publisher:
publish-to-pypi.yml on Ziwei-Wei/wformat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wformat-0.1.1-py3-none-macosx_15_0_arm64.whl -
Subject digest:
bcfdac3908c24378490d2c3111ffd6164ab20c1604f73704ef870707130cf42a - Sigstore transparency entry: 430219243
- Sigstore integration time:
-
Permalink:
Ziwei-Wei/wformat@d8384222da5cf204087fd9f21da5d355fde1d470 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Ziwei-Wei
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@d8384222da5cf204087fd9f21da5d355fde1d470 -
Trigger Event:
workflow_dispatch
-
Statement type: