Mixin lint #2485
-
Hi, With porter v1.0.3 I've started seeing errors like the following:
I suspect some mixin don't implement linting and porter should call that for them.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Oops, that message should only be displayed as a debug message, but it's being printed at info level as well. I must have caused that regression when fixing the ordering of calling mixins during build. Mixins are not required to implement a lint command. If a mixin does implement it, then porter will parse the results and if any of the results are errors (mixins can also report warnings), then lint fails. Since lint is called automatically before build, this can fail builds as well. You can bypass linting during build with the This isn't documented well, but I'd welcome contributions to the docs! We have #2486 which tracks documenting the lint codes returned. Right now there aren't a lot of lint checks, the main one is exec-100 relating to the best practice described in https://getporter.org/best-practices/exec-mixin/#quoting-escaping-bash-and-yaml. But as we add more, we should get the lint functionality better documented. 👍 |
Beta Was this translation helpful? Give feedback.
Oops, that message should only be displayed as a debug message, but it's being printed at info level as well. I must have caused that regression when fixing the ordering of calling mixins during build.
Mixins are not required to implement a lint command. If a mixin does implement it, then porter will parse the results and if any of the results are errors (mixins can also report warnings), then lint fails. Since lint is called automatically before build, this can fail builds as well. You can bypass linting during build with the
--no-lint
flag.This isn't documented well, but I'd welcome contributions to the docs! We have #2486 which tracks documenting the lint codes returned. Right now the…