# Travis lint passes, but online it "Could not parse"

**URL:** <https://travis-ci.community/t/travis-lint-passes-but-online-it-could-not-parse/6999>\
**Category:** Travis CI Discussions & Feedback\
**Tags:** bug, yaml\
**Created:** [January 24, 2020, 5:34pm UTC](https://travis-ci.community/t/travis-lint-passes-but-online-it-could-not-parse/6999 "2020-01-24T17:34:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanySK](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/danysk/32/1399_2.png) [@DanySK](https://travis-ci.community/u/DanySK)\
**Post date:** [January 24, 2020, 5:34pm UTC](https://travis-ci.community/t/travis-lint-passes-but-online-it-could-not-parse/6999/1 "2020-01-24T17:34:58Z")

</div>

I ran into a situation where travis lint approves my build configuration:

```bash
$ travis lint
Hooray, .travis.yml looks valid :)

```

but when pushing I am greeted with “Could not parse …” and the build does not start.

[here](https://github.com/DanySK/Experiment-2019-FGCS-Self-Integration/commit/c34cba2) is the project and the commit where I’m having issues.

for self-containment, I’m reporting the `.travis.yml` here:

```auto
# System

language: bash
git:
  depth: false
addons:
  apt:
    update: true
  homebrew:
    packages:
      - pyenv
os:
  - osx
  - windows
  - linux
env:
  global:
    - TERM=dumb
    - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/"
  matrix:
    - JDK="adopt@1.11"
    - JDK="adopt-openj9@1.11"
    - JDK="adopt@" # Should test the latest
    - JDK="adopt-openj9@"

# Utilities

_python_reference_version: &python_reference_version PYTHON="3.6.3"
_python_reference: &python_reference
  env: *python_reference_version

_deploy_base: &deploy_base
  provider: releases
  edge: true
  file:
    - "${TRAVIS_BUILD_DIR}/*.tar.gz"
    - "${TRAVIS_BUILD_DIR}/charts/*.pdf"
  on:
    <<: *repo_filter
    tags: true

_repo_filter: &repo_filter
  repo: DanySK/Experiment-2019-FGCS-Self-Integration

_os_filter: &os_filter
  condition: $TRAVIS_OS_NAME = linux

_auto_tag: &auto_tag >
    git describe --tags --exact-match HEAD
    || (TAGNAME=$(git describe) && git tag $TAGNAME)
    || git tag "0.1.0-$(git log -n1 --date=format:'%Y-%m-%dT%H%m%S' --format=%cd)"

_make_charts: &make_charts
  os: linux
  language: minimal
  stage: charts
  install:
    - curl "${GRAVIS}.install-python.sh" | bash
    - pip install --upgrade pip
    - pip install -r requirements.txt
  script: travis_wait python process.py
    
# Process

stages:
  - name: test
    if: type = cron OR tag is blank AND NOT commit_message =~ /\[AUTOMATIC.*\].*/
  - name: charts
    if: tag is blank OR NOT commit_message =~ /\[AUTOMATIC.*\].*/
jobs:
  include:
    # Latest Python on OSX
    - <<: *make_charts
      os: osx
    # Python 3.6.3 on OSX
    - <<: *python_reference
      <<: *make_charts
      os: osx
    # Latest Python on Linux
    - <<: *make_charts
    # Python 3.6.3 on Linux with deployment
    - <<: *make_charts
      <<: *python_reference
      before_deploy:
        - tar -czvf "charts.tar.gz" $TRAVIS_BUILD_DIR/charts/
        - git config --local user.name "Danilo Pianini"
        - git config --local user.email "danilo.pianini@unibo.it"
        - *auto_tag
      deploy:
       - <<: *deploy_base
         on:
           <<: *repo_filter
           tags: false
       - <<: *deploy_base

# Common

before_install: true
install:
  - travis_retry curl "${GRAVIS}.install-jdk-travis.sh" --output .install-jdk-travis.sh
  - travis_retry source .install-jdk-travis.sh
script:
  - travis_retry ./gradlew clean showAll --parallel
before_cache:
  - travis_retry curl "${GRAVIS}.clean_gradle_cache.sh" --output .clean_gradle_cache.sh
  - travis_retry bash .clean_gradle_cache.sh
cache:
  directories:
    - $HOME/.gradle/caches/
    - $HOME/.gradle/wrapper/
    - $HOME/.pyenv

```

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [January 24, 2020, 7:29pm UTC](https://travis-ci.community/t/travis-lint-passes-but-online-it-could-not-parse/6999/2 "2020-01-24T19:29:17Z")

</div>

The `lint` command is giving you a false negative. Alias `repo_filter` is undefined on line 40.

> <https://github.com/DanySK/Experiment-2019-FGCS-Self-Integration/blob/c34cba28e9235a3d78a2f058346be65510e14242/.travis.yml#L40>

You should [define it](https://github.com/DanySK/Experiment-2019-FGCS-Self-Integration/blob/c34cba28e9235a3d78a2f058346be65510e14242/.travis.yml#L43-L44) before using it.

---

<div class="post-metadata">

**Author:** ![DanySK](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/danysk/32/1399_2.png) [@DanySK](https://travis-ci.community/u/DanySK)\
**Post date:** [January 24, 2020, 9:21pm UTC](https://travis-ci.community/t/travis-lint-passes-but-online-it-could-not-parse/6999/3 "2020-01-24T21:21:59Z")

</div>

Right, fixed in my code.  
Still, I believe `travis lint` should intercept this kind of mistakes.

Thanks

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [January 24, 2020, 9:42pm UTC](https://travis-ci.community/t/travis-lint-passes-but-online-it-could-not-parse/6999/4 "2020-01-24T21:42:08Z")

</div>

That subcommand will be replaced by the config validator.

> **[The Travis CI Blog: Build Config Validation now in beta](https://blog.travis-ci.com/2019-10-24-build-config-validation)**
>
> We are excited to announce the new Build Config Validation feature. It is now
> in beta, and available for you to activate.
> 
> When active, the build config validation
> feature will validate and normali...
