charm-tools
charm-tools copied to clipboard
charm build does not catch missing hooks
I built a charm with missing hooks, eg. install. charm build happily made the dist. charm proof, however, will catch the error.
Expected: charm proof be part of the lint process during charm build.
In charm-tools/build/builder.py:
def main(): ..... try: if not build.output_dir: build.normalize_outputdir() if not build.series: build.check_series()
build()
lint, exit_code = proof.proof(build.target_dir, False, False)
It actually calls proof.proof. But for some reason it did catch the missing hooks. Why?
All hooks are optional by design. The only required file is metadata.yaml. however, you should see an INFO output about missing items.
What version of charm
do you have? (charm version
)
On Mon, May 29, 2017, 23:17 Feng Xia [email protected] wrote:
In charm-tools/build/builder.py:
def main(): ..... try: if not build.output_dir: build.normalize_outputdir() if not build.series: build.check_series()
build() lint, exit_code = proof.proof(build.target_dir, False, False)
It actually calls proof.proof. But for some reason it did catch the missing hooks. Why?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/juju/charm-tools/issues/325#issuecomment-304765407, or mute the thread https://github.com/notifications/unsubscribe-auth/AAET1XStfdRCtOT_b46iak8uudzv8kaUks5r-4pRgaJpZM4NpxS5 .