Porter Lint Messages

Porter Lint Messages

exec-100

The exec-100 warning is a message generated by the porter lint command when it detects a potential problem with the use of an embedded Bash script in the exec mixin of a Porter bundle. The exec mixin is a feature of Porter that allows you to run commands on a computer from a porter.yaml manifest file.

The exec-100 warning suggests that it is a best practice to avoid using embedded Bash scripts in exec mixins, and to use scripts instead.

Using embedded Bash scripts can be problematic because they can be difficult to read and understand, and they can also be insecure if they are not written correctly. It’s generally a good idea to avoid using embedded Bash scripts if possible, and to use scripts instead.

To fix the problem indicated by the exec-100 warning, you can try replacing any embedded Bash scripts in your exec mixins with scripts.

You can find more information about best practices for using the exec mixin on the Porter website at the following URL: https://porter.sh/best-practices/exec-mixin/#use-scripts.

porter-100

The porter-100 error is a message generated by the porter lint command when it detects when a parameter name has one of the reserved prefixes porter- and porter_.

The porter-100 error suggests that a parameter has been created which uses one of the reserved prefixes.

Using a reserved prefix can be problematic as it can overwrite a predefined parameter resulting in undeterministic behaviour.

To fix the problem indicated by the porter-100 error, you should replace the prefix of any newly defined parameters to not start with “porter”.

You can find more information about parameters in following URL: https://porter.sh/quickstart/parameters/.

porter-101

The porter-101 error suggests that an action uses a parameter that is not available to it.

This is an of a manifest triggering the error (shorten for brevity):

parameters:
  - name: uninstallParam
    type: string
    applyTo:
      - uninstall # Notice the parameter only applies to the uninstall action

install:
  - exec:
      description: "Install Hello World"
      command: ./helpers.sh
      arguments:
        - install
        - "${ bundle.parameters.uninstallParam }"

To fix the problem indicated by the porter-101 error, you should ensure that all parameters used in the action applies to the actions where it is referenced.

You can find more information about applyTo in the following URL: https://porter.sh/docs/bundle/manifest/#parameter-types.

porter-102

The porter-102 error is a message generated by the porter lint command when it detects that multiple dependencies are defined with the same name.

Multiple dependencies with the same name results in undefined behaviour.

To fix the problem, you should name ensure all dependencies have different names.

You can find more information about dependencies in Dependencies.