A Compose or Home Assistant file with one wrong space can cost me a while. yamllint finds those, and the default output is made for humans.
Run it on a file and you get a grouped report with line and column. For scripts, CI or an editor that wants file:line:col, switch the format:
yamllint -f parsable config.yaml
Each problem is one line, for example y.yaml:2:5: [error] too many spaces after colon (colons). The level is error or warning, and the rule name is at the end, so you can look it up or turn it off.
The exit code is 1 when there is an error. Warnings alone don’t fail the run; add -s (--strict) to make them fail too.
A caveat: yamllint checks style as well as syntax, so a file that loads fine can still produce warnings, such as a missing --- at the start.
Further reading: yamllint documentation
Going deeper: Guide: replace a cron job with a systemd timer, and see when it runs next