formatting tool complient with 42 school's norm
Project description
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.6+ (3.7, 3.8, 3.9, 3.10)
from pypi (currently not working)
$ 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 overwritting any file
Vim
Checkout c_formatter_42.vim plugin. This plugin automatically installs the c_formatter_42 package using pip.
VSCode
- Install
c_formatter_42
. - Install keyhr.42-c-format extension.
- Add Configuration to set default to formatting with
c_formatter_42
.
{
"[c]": {
"editor.defaultFormatter": "keyhr.42-c-format"
}
}
You can put this in the .vscode/setting.json
.
Atom
Not supported yet, see related issue.
Feel free to report issues or contribute. :)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
c_formatter_42-0.1.4.tar.gz
(1.9 MB
view hashes)
Built Distribution
Close
Hashes for c_formatter_42-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5882453e77240680b1cb579fbe27540949845bdbae43608a0655507967a667d |
|
MD5 | df75f828a75506bf8fdad95c9a7e1e68 |
|
BLAKE2b-256 | 696d51763c67c4752d84cf901014e4aa325d6274cf7fd68049426db7ff08bed1 |