tests_shellcheck.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. # Project: Game Server Managers - LinuxGSM
  3. # Author: Daniel Gibbs
  4. # License: MIT License, Copyright (c) 2017 Daniel Gibbs
  5. # Purpose: Travis CI Tests: Shellcheck | Linux Game Server Management Script
  6. # Contributors: https://github.com/GameServerManagers/LinuxGSM/graphs/contributors
  7. # Documentation: https://docs.linuxgsm.com/
  8. # Website: https://linuxgsm.com
  9. echo "================================="
  10. echo "Travis CI Tests"
  11. echo "Linux Game Server Manager"
  12. echo "by Daniel Gibbs"
  13. echo "Contributors: http://goo.gl/qLmitD"
  14. echo "https://linuxgsm.com"
  15. echo "================================="
  16. echo ""
  17. echo "================================="
  18. echo "Bash Analysis Tests"
  19. echo "Using: Shellcheck"
  20. echo "Testing Branch: $TRAVIS_BRANCH"
  21. echo "================================="
  22. echo ""
  23. scissues=$(find . -type f \( -name "*.sh" -o -name "*.cfg" \) -not -path "./shunit2-2.1.6/*" -exec shellcheck --shell=bash --exclude=SC2154,SC2034 {} \; | grep -F "^--" | wc -l)
  24. echo "Found issues: ${scissues}"
  25. echo "================================="
  26. find . -type f \( -name "*.sh" -o -name "*.cfg" \) -not -path "./shunit2-2.1.6/*" -exec shellcheck --shell=bash --exclude=SC2154,SC2034 {} \;
  27. echo ""
  28. echo "================================="
  29. echo "Bash Analysis Tests - Complete!"
  30. echo "Using: Shellcheck"
  31. echo "================================="