matejak / argbash

Bash argument parsing code generator
Other
1.4k stars 62 forks source link

Problems updating to 2.6.1 #44

Closed sirchras closed 6 years ago

sirchras commented 6 years ago

Hi, I'm having some trouble updating argbash to v2.6.1 from v2.5.1 on Ubuntu 16.04. Running make develop or make install completes, and argbash appears to work perfectly aside from a weird issue when attempting to get the version number on the command line. However when I run make check I get the following:

make unittests
make[1]: Entering directory '/home/chris_l/argbash/resources'
autom4te -l m4sugar -I ../src/ -I ../tests/unittests ../tests/unittests/check-utils.m4 && autom4te -l m4sugar -I ../src/ -I ../tests/unittests ../tests/unittests/check-indentation.m4 && autom4te -l m4sugar -I ../src/ -I ../tests/unittests ../tests/unittests/check-list.m4 && autom4te -l m4sugar -I ../src/ -I ../tests/unittests ../tests/unittests/check-types.m4 && autom4te -l m4sugar -I ../src/ -I ../tests/unittests ../tests/unittests/check-arguments.m4 && true
../src/utilities.m4:1: warning: file `list.m4' included several times
../src/utilities.m4:1: warning: file `list.m4' included several times
../src/utilities.m4:1: warning: file `list.m4' included several times
make[1]: Leaving directory '/home/chris_l/argbash/resources'
make regressiontests
make[1]: Entering directory '/home/chris_l/argbash/resources'
diff -q ../tests/regressiontests/basic.sh ../tests/regressiontests/basic2.sh
test -z "shellcheck -x -e 2015" || shellcheck -x -e 2015 "../tests/regressiontests/basic.sh"
unrecognized option `-x'

Usage: shellcheck [OPTIONS...] FILES...
  -e CODE1,CODE2..  --exclude=CODE1,CODE2..  exclude types of warnings
  -f FORMAT         --format=FORMAT          output format
  -s SHELLNAME      --shell=SHELLNAME        Specify dialect (bash,sh,ksh)
  -V                --version                Print version information

../tests/regressiontests/Makefile:186: recipe for target 'stability' failed
make[1]: *** [stability] Error 3
make[1]: Leaving directory '/home/chris_l/argbash/resources'
Makefile:115: recipe for target 'check' failed
make: *** [check] Error 2

It appears to be complaining about the version of shellcheck I have installed, v0.3.7-5, and I just wasn't sure if there was anything wrong with argbash or if a newer version of shellcheck was required.

matejak commented 6 years ago

Hello, could you please provide more details about the weird version number issue?

However, your main question is clearly related to old version of shellcheck that isn't aware of the -x option.

You can try to run make check SHELLCHECK= to disable shellcheck, but it may not work due to a minor bug in the Makefile. In that case, you should be fine if you simply comment or remove the 6th line in Makefile that contains the SHELLCHECK variable assignment.

sirchras commented 6 years ago

Thanks, the disabled shellcheck check worked. The problem is that the --version flag doesn't print the version number for argbash, it just prints argbash v, but argbash-init and argbash-1to2 do. It's pretty minor, but the make check output made me wonder if there was something up.

matejak commented 6 years ago

I am glad that it worked! The missing version is another bug of 2.6.1, thank you for reporting it!