https://kotlinlang.org logo
#announcements
Title
# announcements
n

nuhkoca

11/16/2019, 4:22 PM
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

wasyl

11/16/2019, 4:47 PM
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

gildor

11/16/2019, 5:18 PM
Ohh, yaml is such a mess... You need a parser from "human readable" format to mostly machine readable to spot a bug
n

nuhkoca

11/16/2019, 6:35 PM
@wasyl ahh what a silly me 😄, thanks bro you saved my day! It’s the reason I forgot
:
t

tapchicoma

11/16/2019, 7:16 PM
I advice to use this tool for CircleCI config: https://circleci.com/docs/2.0/local-cli/#validate-a-circleci-config
n

nuhkoca

11/16/2019, 8:48 PM
Thanks @tapchicoma! I just installed yamllint and it validates any kind of yml files.
t

tapchicoma

11/16/2019, 8:49 PM
tool above also validate correctness of your
config.yml
from configuration perspective
n

nuhkoca

11/16/2019, 9:16 PM
Thanks I will give it a try, BTW are you experienced in CircleCI workflows, especially branches?
11 Views