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
Copy file name to clipboardExpand all lines: manifest-reference.md
+23
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,8 @@ Every manifest file consists of the following sections:
49
49
Dependencies only needed for tests
50
50
-[*install*](#installation-configuration):
51
51
Installation configuration
52
+
-[*extra*](#additional-free-data-field):
53
+
Additional free data field
52
54
53
55
54
56
[TOML]: https://toml.io/
@@ -479,3 +481,24 @@ By default only executables are installed, library projects can set the *library
479
481
[install]
480
482
library = true
481
483
```
484
+
485
+
486
+
## Additional free data field
487
+
488
+
Third-party tools can store their configuration inside the *extra* section.
489
+
This section will never be evaluated by fpm itself, the only constraint imposed is that it has to be valid TOML.
490
+
491
+
Since the format of this section is free, only recommendations are provided here for adding data to the *extra* section.
492
+
493
+
1. Only use subtables, never add configuration data to the top level of the *extra* section.
494
+
Reasoning: different tools can avoid collisions of key names by placing their data in separate subtables.
495
+
2. Use the concrete name of the tool rather than a generic name for the subtable.
496
+
Reasoning: different formatter or linter tools might use conflicting keywords in a *format* or *lint* subtable.
497
+
Also, users can tell from the table name which tool is preferred to use with the project.
498
+
3. Fpm plugins should use a subtable with their plugin name in the *extra.fpm* section to store their data.
499
+
Reasoning: following this convention provides the user of fpm plugins with one section to configure their used plugins.
500
+
4. Use the fpm preferred style for keywords which is lowercase with dashes.
501
+
Reasoning: while there is no style check in this section, a consistent style in the whole manifest will make it easier for the user to understand the whole package manifest.
502
+
503
+
Feedback for the recommendations above is very much welcome.
504
+
If you have a tool that uses the *extra* section in the package manifest, feel free to post it in at the [fpm discussion board](https://github.com/fortran-lang/fpm/discussions).
0 commit comments