4
0

tests_shellcheck.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. # Project: Game Server Managers - LinuxGSM
  3. # Author: Daniel Gibbs
  4. # License: MIT License, Copyright (c) 2020 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 -e "================================="
  10. echo -e "Travis CI Tests"
  11. echo -e "Linux Game Server Manager"
  12. echo -e "by Daniel Gibbs"
  13. echo -e "Contributors: http://goo.gl/qLmitD"
  14. echo -e "https://linuxgsm.com"
  15. echo -e "================================="
  16. echo -e ""
  17. echo -e "================================="
  18. echo -e "Bash Analysis Tests"
  19. echo -e "Using: Shellcheck"
  20. echo -e "Testing Branch: $TRAVIS_BRANCH"
  21. echo -e "================================="
  22. echo -e ""
  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 -e "Found issues: ${scissues}"
  25. echo -e "================================="
  26. find . -type f \( -name "*.sh" -o -name "*.cfg" \) -not -path "./shunit2-2.1.6/*" -exec shellcheck --shell=bash --exclude=SC2154,SC2034 {} \;
  27. echo -e ""
  28. echo -e "================================="
  29. echo -e "Bash Analysis Tests - Complete!"
  30. echo -e "Using: Shellcheck"
  31. echo -e "================================="