0
votes

Am new to code climate and am facing this error when i run my github project on codeclimate.

codeclimate validate-config
ERROR: Unable to parse: (<unknown>): found unexpected end of stream while scanning a quoted scalar at line 23 column 5

Below is my .codeclimate.yml file :

---
machine:
  environment:
    CODECLIMATE_REPO_TOKEN: ab24b326dac817e772c5246823b67af66e2358e51134c33e20aaf7fb228088b0

engines:
  duplication:
    enabled: false
    config:
      languages:
      - python
  fixme:
    enabled: true
  pep8:
    enabled: true
  radon:
    enabled: true
ratings:
  paths:
  - "**.py"
exclude_paths:
  - "docs/*"
  - "examples/*
  -*api/songs/models*
  -*/site-packages/*
  -*markupsafe/*
  -*psycopg2/*
  -*six.py*
  -*sqlalchemy/*
  -*werkzeug/*
  -*stringprep.py*
  -*uuid.py*
  -*ctypes/*
  -*decimal.py*
  -*encodings/*
  -*hmac.py*
  -*asyncio/*
  -*concurrent/*
  -*multiprocessing/*
  -*mimetypes.py*
  -*numbers.py*
  -*pydoc.py*
  -*http/*
  -*app/api/user/__init__.py*
  -*app/api/request/__init__.py*
  -*app/api/__init__.py*
  -*app/__init__.py*
  -*app/config.py*
  -*app/model/*
  -*test/*
  -*html/*
  -*_bootlocale.py*
  -*typing.py*

The line line 23 which is in the error message is as below in the file above:

  - "examples/*

What should i do to correct this?

1

1 Answers

1
votes

The problem with that line is it's missing the closing quotation mark. However, all of the exclude_paths patterns will need to be enclosed in quotes; i.e. the config should look like this:

---
machine:
  environment:
    CODECLIMATE_REPO_TOKEN: ab24b326dac817e772c5246823b67af66e2358e51134c33e20aaf7fb228088b0

engines:
  duplication:
    enabled: false
    config:
      languages:
      - python
  fixme:
    enabled: true
  pep8:
    enabled: true
  radon:
    enabled: true
ratings:
  paths:
 - "**.py"
exclude_paths:
 - "docs/*"
 - "examples/*"
 - "*api/songs/models*"
 - "*/site-packages/*"
 - "*markupsafe/*"
 - "*psycopg2/*"
 - "*six.py*"
 - "*sqlalchemy/*"
 - "*werkzeug/*"
 - "*stringprep.py*"
 - "*uuid.py*"
 - "*ctypes/*"
 - "*decimal.py*"
 - "*encodings/*"
 - "*hmac.py*"
 - "*asyncio/*"
 - "*concurrent/*"
 - "*multiprocessing/*"
 - "*mimetypes.py*"
 - "*numbers.py*"
 - "*pydoc.py*"
 - "*http/*"
 - "*app/api/user/__init__.py*"
 - "*app/api/request/__init__.py*"
 - "*app/api/__init__.py*"
 - "*app/__init__.py*"
 - "*app/config.py*"
 - "*app/model/*"
 - "*test/*"
 - "*html/*"
 - "*_bootlocale.py*"
 - "*typing.py*"

Note: You'll still see some deprecation warnings because you're using the old .codeclimate.yml format. There is information about converting from the old format to version 2 in the CodeClimate docs:

https://docs.codeclimate.com/docs/advanced-configuration#section-analysis-configuration-versions