A Collection of pre-commit hooks for MATLAB
Project description
pre-commit-matlab
A collection of pre-commit hooks for MATLAB
Ok... it's just one hook so far but maybe someday there will be more 😃
Using pre-commit-matlab with pre-commit
Add this to your .pre-commit-config.yaml
- repo: https://github.com/sco1/pre-commit-matlab
rev: v1.0.0
hooks:
- id: matlab-reflow-comments
args: [--line-length=100]
Hooks
matlab-reflow-comments
Reflow comments (lines beginning with %
) in MATLAB file(s) (*.m
) to the specified line length.
Blank comment lines are passed back into the reformatted source code.
- Specify line length with
args: [--line-length=100]
(Default:75
) - Ignore comments with inner indentation
args: [--ignore-indented=True]
(Default:True
)
If ignore_indented
is True
, comments that contain inner indentation of at least two spaces
is passed back into the reformatted source code as-is. Leading whitespace in the line is not
considered.
For example:
% This is not indented
% This is not indented
% This is indented
% This is indented
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pre-commit-matlab-1.0.0.tar.gz
.
File metadata
- Download URL: pre-commit-matlab-1.0.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.9.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac88763a144d36c7a4d1df48dcb93ed60d8ed141155502597dc920b9fc062b8a |
|
MD5 | 38b52740587df7ce383d7a1aad86fa3e |
|
BLAKE2b-256 | 79961723867242e2c7973e5d433559d0813673beccdb227d0277598066b2411b |
Provenance
File details
Details for the file pre_commit_matlab-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: pre_commit_matlab-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.9.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab743805c1a6e97f52359748c48562ca7531609eb4c0af8557ac99ff13ffb86e |
|
MD5 | 75648e16d916953d5acb2d8a9d18dbd8 |
|
BLAKE2b-256 | fe6221989e127c8a226927c34f25118a0839189e06373333a3a76c5cf57dd2e0 |