forked from mirror/nnn
Add Makefile target shellcheck
This commit is contained in:
parent
b75a22f72d
commit
b0580905f2
10 changed files with 17 additions and 7 deletions
|
@ -75,7 +75,7 @@ jobs:
|
|||
echo "########## clang-tidy-11 ##########"
|
||||
clang-tidy-11 src/* -- -I/usr/include -I/usr/include/ncursesw
|
||||
echo "########## shellcheck ##########"
|
||||
find plugins/ -type f -not -name "*.md" -exec shellcheck -e SC1090,SC2230 {} +
|
||||
find plugins/ -type f -not -name "*.md" -exec shellcheck {} +
|
||||
|
||||
package-and-publish:
|
||||
machine: true
|
||||
|
|
3
Makefile
3
Makefile
|
@ -261,6 +261,9 @@ musl:
|
|||
./musl-static-ubuntu.sh 1
|
||||
rm ./musl-static-ubuntu.sh
|
||||
|
||||
shellcheck:
|
||||
find ./plugins/ -type f -not -name "*.md" -exec shellcheck {} +
|
||||
|
||||
dist:
|
||||
mkdir -p nnn-$(VERSION)
|
||||
$(CP) -r $(DISTFILES) nnn-$(VERSION)
|
||||
|
|
|
@ -7,9 +7,10 @@ Before suggesting changes, please read a bit about [the design principles nnn fo
|
|||
|
||||
`nnn` follows the Linux kernel coding style closely. The C source code uses TABs and the plugins use 4 spaces for indentation.
|
||||
|
||||
Changes should not break the patch framework. Please run `make checkpatches` before raising a PR.
|
||||
- Code changes should not break the patch framework. Please run `make checkpatches` to ensure.
|
||||
- Run `make shellcheck` if adding/modifying plugins.
|
||||
|
||||
CI runs `shellcheck` on plugins. Please watch out for any failures if you are modifying/adding a plugin.
|
||||
CI runs patch framework sanity test and `shellcheck`. Please watch out for any failures after raising the PR.
|
||||
|
||||
## Resources
|
||||
The [wiki](https://github.com/jarun/nnn/wiki/Developer-guides) has some resources for developers you might be interested in: building, debugging...
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
# Shell: POSIX compliant
|
||||
# Author: Arun Prakash Jana
|
||||
|
||||
GUIPLAYER="${GUIPLAYER}"
|
||||
GUIPLAYER="${GUIPLAYER:-""}"
|
||||
NUMTRACKS="${NUMTRACKS:-100}"
|
||||
|
||||
if [ -n "$GUIPLAYER" ]; then
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
# Shell: POSIX compliant
|
||||
# Author: Yuri Kloubakov
|
||||
|
||||
# shellcheck disable=SC1090,SC1091
|
||||
. "$(dirname "$0")"/.nnn-plugin-helper
|
||||
|
||||
# Get a list of (symbolic links to) directories for every element of CDPATH
|
||||
|
|
|
@ -22,10 +22,11 @@
|
|||
|
||||
IFS="$(printf '\n\r')"
|
||||
|
||||
# shellcheck disable=SC1090,SC1091
|
||||
. "$(dirname "$0")"/.nnn-plugin-helper
|
||||
|
||||
CTX=+
|
||||
LIST="$LIST"
|
||||
LIST="${LIST:-""}"
|
||||
|
||||
if ! type fzf >/dev/null 2>&1; then
|
||||
printf "fzf missing"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
NUKE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins/nuke"
|
||||
USE_NUKE=0
|
||||
|
||||
# shellcheck disable=SC1090,SC1091
|
||||
. "$(dirname "$0")"/.nnn-plugin-helper
|
||||
|
||||
if type fzf >/dev/null 2>&1; then
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
# Shell: POSIX compliant
|
||||
# Author: Arun Prakash Jana
|
||||
|
||||
EBOOK_ID="${EBOOK_ID}"
|
||||
EBOOK_ID="${EBOOK_ID:-""}"
|
||||
DIR="${XDG_CACHE_HOME:-$HOME/.cache}/nnn/gutenbooks/$EBOOK_ID"
|
||||
BROWSE_LINK="https://www.gutenberg.org/ebooks/search/?sort_order=downloads"
|
||||
BROWSER="${BROWSER:-w3m}"
|
||||
READER="${READER}"
|
||||
READER="${READER:-""}"
|
||||
|
||||
if [ -n "$EBOOK_ID" ]; then
|
||||
if [ ! -e "$DIR" ]; then
|
||||
|
|
|
@ -112,6 +112,7 @@ check_update="true"
|
|||
|
||||
settings_path="${HOME}/.config/imgur-screenshot/settings.conf"
|
||||
if [ -f "${settings_path}" ]; then
|
||||
# shellcheck disable=SC1090
|
||||
source "${settings_path}"
|
||||
fi
|
||||
|
||||
|
@ -204,6 +205,7 @@ function load_access_token() {
|
|||
token_expire_time=0
|
||||
# check for saved access_token and its expiration date
|
||||
if [ -f "${credentials_file}" ]; then
|
||||
# shellcheck disable=SC1090
|
||||
source "${credentials_file}"
|
||||
fi
|
||||
current_time="$(date +%s)"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
# Shell: POSIX compliant
|
||||
# Author: Arun Prakash Jana
|
||||
|
||||
# shellcheck disable=SC1090,SC1091
|
||||
. "$(dirname "$0")"/.nnn-plugin-helper
|
||||
|
||||
printf "mime (e.g., video/audio/image): "
|
||||
|
|
Loading…
Reference in a new issue