dist: trusty
sudo: false
language: c

branches:
  only:
    - master

cache:
  directories:
    - $HOME/env

before_install:
  - pip install --user hererocks
  - hererocks $HOME/env --luajit 2.0.3 --luarocks latest
  - source $HOME/env/bin/activate

install:
  - luarocks show lanes > /dev/null || luarocks install lanes
  - luarocks show luacheck > /dev/null || luarocks install luacheck
  - luarocks list --outdated --porcelain | awk '{ print $1, $3 }' | xargs --no-run-if-empty -n 2 luarocks install

script:
  - git diff --check $TRAVIS_COMMIT_RANGE
  - git diff --name-only $TRAVIS_COMMIT_RANGE | grep '\.lua$' | xargs --no-run-if-empty luacheck --std min+garrysmod+wiremod

dist: trusty
sudo: false
language: c

branches:
  only:
    - master

cache:
  directories:
    - $HOME/env

before_install:
  - pip install --user hererocks
  - hererocks $HOME/env --luajit 2.0.3 --luarocks latest
  - source $HOME/env/bin/activate

install:
  - luarocks show lanes > /dev/null || luarocks install lanes
  - luarocks show luacheck > /dev/null || luarocks install luacheck
  - luarocks list --outdated --porcelain | awk '{ print $1, $3 }' | xargs --no-run-if-empty -n 2 luarocks install

script:
  - git diff --check $TRAVIS_COMMIT_RANGE
  - git diff --name-only $TRAVIS_COMMIT_RANGE | grep '\.lua$' | grep -v '^lua/entities/gmod_wire_expression2/core/' | xargs --no-run-if-empty luacheck --std min+garrysmod+wiremod

Stop running Luacheck on E2 extension files
Stop running Luacheck on E2 extension files

They use a custom preprocessor so don't contain standard Lua syntax.
This should stop Travis builds failing when somebody touches these files.
See #1087 for a discussion on this.