stages:
  - test
  - beautifier

docs:
  stage: test
  image: it4innovations/docker-mdcheck:latest
  script:
  - mdl -r ~MD013 *.md

big_files:
  stage: test
  image: it4innovations/docker-mdcheck:latest
  script:
  - find . -type f -not -path "*.git*" -size +10M
  - find . -type f -not -path "*.git*" -size +10M -exec false {} +

other_files:
  stage: test
  image: it4innovations/docker-mdcheck:latest
  script:
  - find . -type f -not -path "*.git*" ! -name "*.eb" ! -name "*.patch*" ! -name ".git*" ! -name "LICENSE" ! -name "*.md" ! -name "*.sh"
  - find . -type f -not -path "*.git*" ! -name "*.eb" ! -name "*.patch*" ! -name ".git*" ! -name "LICENSE" ! -name "*.md" ! -name "*.sh" -exec false {} +

python_formatter:
  stage: beautifier
  image: it4innovations/docker-pycheck:latest
  script:
  - for i in `git whatchanged -4 | egrep "new|modified" | grep ".eb" | cut -d ":" -f 2 | cut -d " " -f 4`; do echo $i; autopep8 --aggressive --aggressive "$i"; done 
  only:
  - master
