charm-tools icon indicating copy to clipboard operation
charm-tools copied to clipboard

charm build does not catch missing hooks

Open fengxia41103 opened this issue 7 years ago • 2 comments

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.

fengxia41103 avatar May 30 '17 02:05 fengxia41103

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?

fengxia41103 avatar May 30 '17 03:05 fengxia41103

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 .

marcoceppi avatar May 30 '17 03:05 marcoceppi