Linting and Improving Your Bash Scripts with ShellCheck

Опубликовано: 05 Май 2020
на канале: Nick Janetakis
2,339
66

ShellCheck helps you find subtle and obvious bugs / issues with your shells scripts.

Hit the subscribe button to receive more videos like this!

---

Timestamped table of contents:

0:00 -- What we'll cover in this video
1:20 -- Running ShellCheck against our broken script
1:59 -- Making sure your script has a shebang defined at the top of the file
2:34 -- Crawling through ShellCheck warnings one by one
3:18 -- You can only define local variables in a function with Bash, not POSIX shell
4:16 -- Help detect invalid commands by splitting variable references and assignments
5:48 -- If you want to interpolate variables, use double quotes not single quotes
7:34 -- Debugging an error and using ShellCheck's output to help fix a typo
9:15 -- Importance of splitting out your variable's reference and assignment
10:54 -- Ignoring a specific ShellCheck warning
12:10 -- ShellCheck is very nice to hook up with your continuous integration server
12:47 -- An example of using ShellCheck with Travis-CI for an open source project
13:56 -- I use ShellCheck all the time in my own scripts and it's easy to install
14:29 -- Messing around with https://shellcheck.net without having to install it locally

Reference links:

https://github.com/koalaman/shellcheck
https://shellcheck.net

---

Follow along?

Personal Website: https://nickjanetakis.com
Twitter:   / nickjanetakis  


На этой странице сайта вы можете посмотреть видео онлайн Linting and Improving Your Bash Scripts with ShellCheck длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Nick Janetakis 05 Май 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 2,339 раз и оно понравилось 66 зрителям. Приятного просмотра!