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

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

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

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

here is the project and the commit where I’m having issues.

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

# 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

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

You should define it before using it.

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

Thanks

That subcommand will be replaced by the config validator.

Imprint