Analyzers and linters
The following are the different checks that Charmcraft will run explicitly (when the user executes its
analyze method) or implicitly (when packing charms).
You can read more about these checks in the Charmcraft Analyze Specification.
These are checks for characteristics or attributes identified from the charm.
If through analysis, the charm can be detected as being a Python based charm, then language shall be set to
python. If not, it shall be set to
When working with Python, it is possible to only publish byte-code. By doing so, troubleshooting is a harder task. Charms with Python sources delivered are preferred.
This attribute meets the requirements to be set to
- the charm has a text dispatch which executes a .py
- the charm has a .py entry point
- the entry point file is executable
When using the Operator Framework, it is best to import it from a common path and not make customisation or package forks from it. If the Operator Framework is detected in the charm sources, this attribute’s value shall be set to
operator. If not, the charm may be using the Reactive Framework, and in this case the attribute value will be
reactive. Else, it shall be set to
This check hint meets the requirements for Operative Framework when:
- language attribute is set to
- the charm contains
- the charm imports
opsin the entry point
The requirements for Reactive Framework are:
…or the Reactive Framework is used, if the charm…
- has a metadata.yaml with
- has a
reactive/<name>.pyfile that imports
- has a file name that starts with
Juju Metadata Linter
This linter verifies that the
metadata.yaml file exists and is sane.
The charm is considered to have a valid metadata if the following checks are true:
- it is a valid YAML file
- it has at least the following fields:
Last updated 20 days ago.