Skip to content

Commit

Permalink
Merge pull request #8 from urbanopt/bug/pre-commit-format
Browse files Browse the repository at this point in the history
Constrain pre-commit to .mo files
  • Loading branch information
nllong authored Jun 18, 2020
2 parents fb2fce7 + f56274b commit 073d6ee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,19 @@ To run the example:
The resulting .mo file can be diffed to the previous file to compare how the modelica-fmt updates the file.

## Usage with pre-commit framework
After adding modelicafmt to your system path, add the following lines to your .pre-commit-config.yaml file under the `repos:` section

After adding modelicafmt to your system path, add the following lines to your .pre-commit-config.yaml file under the `repos:` section.
Also, make sure to allow modelicafmt to run (especially on Mac).

```yaml
-
repo: local
hooks:
-
id: modelica-fmt
name: Modelica Formatter
types: [file]
files: \.(mo)$
entry: modelicafmt
args: ["-w"]
language: system
Expand Down

0 comments on commit 073d6ee

Please sign in to comment.