c_formatter_42
C language prettier that conforms to 42 norm v3. I know you are already a good human norm. It's just for convenience.
Installation
Requires Python3.8+ (3.9, 3.10, 3.11, 3.12)
From PyPI
pip3 install c-formatter-42
pip3 install --user c-formatter-42 # If you don't have root privileges
From source
git clone https://github.com/cacharle/c_formatter_42
cd c_formatter_42
pip3 install -e .
Usage
Command line
c_formatter_42 < file.c
python3 -m c_formatter_42 < file.c # If you get 'command not found' with the previous one
c_formatter_42 --help
usage: c_formatter_42 [-h] [-c] [FILE [FILE ...]]
Format C source according to the norm
positional arguments:
FILE File to format inplace, if no file is provided read STDIN
optional arguments:
-h, --help show this help message and exit
-c, --confirm Ask confirmation before overwriting any file
Plugins / Extensions
Vim
Check out the c_formatter_42.vim plugin. This plugin automatically installs the c_formatter_42 package using pip.
Visual Studio Code
- Install
c_formatter_42 - Install the
keyhr.42-c-formatextension - Set
keyhr.42-c-formatas the default formatter for C files in.vscode/settings.json
{
"[c]": {
"editor.defaultFormatter": "keyhr.42-c-format"
}
}
Contributing
Feel free to report issues or contribute. :)
Run the tests
pip3 install tox
tox
tox -e py311 # for a specific python version
Deploy a new version
pip3 install bumpversion
bumpversion [major|minor|patch]
git push
git push --tags
Go to: https://github.com/dawnbeen/c_formatter_42/tags and click on the tag you just created.
Then click on Create release from tag, the pipeline will build and deploy that version for you.
Metadata
Release files for c-formatter-42 0.2.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| c_formatter_42-0.2.8.tar.gz | 4.0 MB | Without provenance | Details for c_formatter_42-0.2.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| c_formatter_42-0.2.8-py3-none-any.whl | Python 3 | none | any | Details for c_formatter_42-0.2.8-py3-none-any.whl |
Total release size: 8.0 MB
Release files / c_formatter_42-0.2.8.tar.gz
| Download URL | c_formatter_42-0.2.8.tar.gz |
|---|---|
| Size | 4.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da31b1ab4cdc92dd363ae791244cf063982e29c9fc54dbde0f22fce20a2b057b
|
|
BLAKE2b-256 checksum How to use checksums |
77faedee608023d6adc567d1060b4b889b6279e0f99ff3b3cc58bfa4eda069dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Release files / c_formatter_42-0.2.8-py3-none-any.whl
| Download URL | c_formatter_42-0.2.8-py3-none-any.whl |
|---|---|
| Size | 4.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9a507a02676243d4f58fe42e8d5c6aaea8a21a6f77f3c553db61a574e12ec806
|
|
BLAKE2b-256 checksum How to use checksums |
d5d2a5529d6d5fdf3c94609826c27564e8927fef95ae1c0fa8b099f978a1d736
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Security for c-formatter-42 0.2.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.