OFF-TOPIC Anyone has an experience with `yml or y...
# announcements
n
OFF-TOPIC Anyone has an experience with
yml or yaml
files? I have below block in my config.yml however it throws below error:
mapping values are not allowed here in "<unicode string>", line 95, column 18: filters:
Copy code
workflows:
  version: 2

  build_and_test:
    jobs:
      - build_and_setup
          filters:
            branches:
              only: master
I use
CircleCI
and in the official documentation, it shows the same usage. https://circleci.com/docs/2.0/configuration-reference/#full-example
1
w
I think you’re missing a
:
after
build_and_setup
?
👍 3
https://yaml-online-parser.appspot.com/ nicely maps yaml to json btw, might be helpful to spot issues like wrong indentation
g
Ohh, yaml is such a mess... You need a parser from "human readable" format to mostly machine readable to spot a bug
n
@wasyl ahh what a silly me 😄, thanks bro you saved my day! It’s the reason I forgot
:
t
I advice to use this tool for CircleCI config: https://circleci.com/docs/2.0/local-cli/#validate-a-circleci-config
n
Thanks @tapchicoma! I just installed yamllint and it validates any kind of yml files.
t
tool above also validate correctness of your
config.yml
from configuration perspective
n
Thanks I will give it a try, BTW are you experienced in CircleCI workflows, especially branches?