You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PYEXECPATH ?= $(shell which python3.12 || which python3.11 || which python3.10 || which python3.9 || which python3.8 || which python3.7 || which python3)
Copy file name to clipboardExpand all lines: README.md
+31-1Lines changed: 31 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Documentation and associated papers are licensed with the Creative Commons Attri
43
43
44
44
The intent is that the source and documentation are available for use by people implementing their own optional types as well as people using the optional presented here as-is.
45
45
46
-
The README itself is licesed with CC0 1.0 Universal. Copy the contents and incorporate in your own work as you see fit.
46
+
The README itself is licensed with CC0 1.0 Universal. Copy the contents and incorporate in your own work as you see fit.
47
47
48
48
// SPDX-License-Identifier: CC0-1.0
49
49
@@ -237,6 +237,36 @@ Test project /path/to/Beman.Optional26/.build
237
237
No tests were found!!!
238
238
```
239
239
240
+
#### Pre-Commit for Linting
241
+
Various linting tools are configured and installed via the [pre-commit](https://pre-commit.com/) framework. This requires a working python environment, but also allows the tools, such as clang-format and cmake-lint, to be versioned on a per project basis rather than being installed globally. Version changes in lint checks often means differences in success or failure between the versions in CI and the versions used by a developer. By using the same configurations, this problem is avoided.
242
+
243
+
In order to set up a python environment, using a python virtual environment can simplify maintaining different configurations between projects. There is no particular dependency on a particular python3 version.
This will create the venv, install the python and python development tools, and run bash with the PATH and other environment variables set to use the venv preferentially.
256
+
257
+
##### Running the linting tools
258
+
```shell
259
+
pre-commit run -a
260
+
```
261
+
262
+
This will download and configure the lint tools specified in .pre-commit-config.yaml.
263
+
264
+
There is also a Makefile that will automate this process and keep everything up to date.
265
+
266
+
```shell
267
+
make lint
268
+
```
269
+
240
270
## Papers
241
271
242
272
Latest revision(s) of the papers can be built / found at:
0 commit comments