woodpecker-ci / woodpecker

Woodpecker is a simple yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
3.88k stars 345 forks source link

Improve bad habit warning without `when` block #3773

Open neuschaefer opened 3 weeks ago

neuschaefer commented 3 weeks ago

Component

web-ui

Describe the bug

I have a simple workflow in which I did not specify any when block. Woodpecker produces the following lint, which mentions a when block:

when

Steps to reproduce

steps:
  build:
    image: debian:12
    commands:
      - apt-get update && apt-get install -y git cmake ninja-build g++ gcc-arm-none-eabi python3
      - cmake -B build -G Ninja -DPICO_SDK_PATH=pico-sdk
      - ninja -C build

Expected behavior

System Info

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"2.5.0"}

Additional context

I reworded this issue a few times, because my original goal was to clone a repo non-recursively, and it wasn't entirely clear to me from the documentation, how to do this.

I found https://github.com/woodpecker-ci/woodpecker/issues/3607, which discusses a similar issue, and I'm not sure if the next version of Woodpecker might perhaps fix what I described. I have not installed woodpecker-next because that would be another project of multiple hours.

Validations

qwerty287 commented 3 weeks ago

If you didn't know yet, there's a more detailed description of this in the docs: https://woodpecker-ci.org/docs/usage/linter#event-filter-for-all-steps

neuschaefer commented 3 weeks ago

If you didn't know yet, there's a more detailed description of this in the docs: https://woodpecker-ci.org/docs/usage/linter#event-filter-for-all-steps

I saw the page, but both the message and the longer documentation section are still very confusing because they (seem to) assume (wrongly) that I have a when block.

qwerty287 commented 3 weeks ago

Do you have a better suggestion?

neuschaefer commented 3 weeks ago

Do you have a better suggestion?