Skip to content

Commit e7380a8

Browse files
authored
Merge pull request #53 from davidhcefx/feat-add-ci
enh(CI): Add CI to shellcheck the scripts
2 parents 8d86d54 + 42d1ac5 commit e7380a8

File tree

4 files changed

+35
-2
lines changed

4 files changed

+35
-2
lines changed

.github/workflows/shellcheck.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: shellcheck
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
workflow_dispatch:
8+
9+
jobs:
10+
shellcheck:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: ShellCheck
16+
uses: ludeeus/[email protected]
17+
#with:
18+
# A space separated list of additional filename to check
19+
#additional_files: # optional, default is
20+
# Paths to ignore when running ShellCheck
21+
#ignore: # optional, default is
22+
# Minimum severity of errors to consider. Options: [error, warning, info, style]
23+
#severity: # optional, default is
24+
# Run shellcheck on _all_ files at once, instead of one at a time
25+
#check_together: # optional, default is
26+
# Directory to be searched for files. Defaults to .
27+
#scandir: # optional, default is .
28+
# Set to true to skip using problem-matcher
29+
#disable_matcher: # optional, default is false
30+
# Output format (checkstyle, diff, gcc, json, json1, quiet, tty)
31+
#format: # optional, default is gcc

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ _version_str_to_num() {
3737
if [ -z "$1" ]; then
3838
return
3939
fi
40-
printf "$1" | awk -F . '{printf("%d%02d%02d", $1, $2, $3)}'
40+
echo -n "$1" | awk -F . '{printf("%d%02d%02d", $1, $2, $3)}'
4141
}
4242

4343
_find_suitable_branch() {

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Improved Nano Syntax Highlighting Files
22

3+
[![shellcheck](https://github.com/galenguyer/nano-syntax-highlighting/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/galenguyer/nano-syntax-highlighting/actions/workflows/shellcheck.yml)
4+
35
This repository holds ``{lang}.nanorc`` files that have improved definitions of syntax highlighting for various languages.
46

57
This repository is forked from [github.com/scopatz/nanorc](https://github.com/scopatz/nanorc) after almost 2 years of no activity from the maintainer.

tool/switch-branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /usr/bin/env bash
22

3-
cd "$(dirname "$0")/../"
3+
cd "$(dirname "$0")/../" || exit 1
44

55
verstr=$(nano --version 2>/dev/null | awk '/GNU nano/ {print ($3=="version")? $4: substr($5,2)}')
66
branch=$(./install.sh --find_suitable_branch)

0 commit comments

Comments
 (0)