aboutsummaryrefslogtreecommitdiff
path: root/lint
Commit message (Collapse)AuthorAgeFilesLines
* Tidy and correct linting for all three shellsTom Ryder2017-10-313-10/+23
| | | | | | | | | | | | | Reduce each one to target only the dotfiles specifically for that shell, as opposed to previously where for example the `check-sh` target was checking shell shims in for `mpd` and `plenv`. I'm still not completely sure that's the right approach, but it's at least less conceptually muddy than what we had before. Notably, the check and lint for Korn shell includes a single POSIX shell script file in its `shrc.d` subdirectory, so that check is executed separately.
* Use shell name not command in check/lint messagesTom Ryder2017-10-311-3/+3
| | | | This is a little bit clearer and nicer to read, I think.
* Apply stable check and lint methods to games shellTom Ryder2017-10-311-1/+7
| | | | | | | | | | | | | This applies the same stable approach to testing the actual built games that are shebannged with #!/bin/sh as has been applied to the shell scripts in the `check-bin` and `lint-bin` targets. There are no GNU Bash games in these directories, so the latter block of code from the `bin` analogues to check or lint those is not needed. The same applies here; this is not as complete a checking or linting of the games directory as it could be; ideally we would check the sed(1) and awk(1) scripts too.
* Correct copypaste errors in `check-bin`, `lint-bin`Tom Ryder2017-10-311-3/+3
| | | | | Use consistent variable names, and strip the correct suffix from the Bash scripts on iteration.
* Add conditional Bash `check-bin`, `lint-bin`Tom Ryder2017-10-311-0/+13
| | | | | | Both blocks are analogues of the POSIX checks, but are wrapped in a conditional so that bash(1) doesn't become a hard dependency of the default `make install` target.
* Show explicit success message for `lint-bin`Tom Ryder2017-10-311-1/+2
| | | | | We add an `|| exit` short-circuit for the case of `shellcheck` exiting non-zero.
* Adjust `check-bin`, `lint-bin` for built scriptsTom Ryder2017-10-311-1/+5
| | | | | | | | | | | | | | | | Make the `$(BINS)` target a prerequisite of `check-bin` so that all of the scripts with a #!/bin/sh shebang are built, and then check them all by iterating through a glob (and hence an order according to LC_COLLATE) and stripping the `.sh` suffix to find the name of the matching shebanged script. Leverage `shellcheck`'s support of multiple check arguments to build an argument list of the binscripts first before passing all of those to a single call, simply for speed. We don't have anything in this target to test the scripts of any other type, such as the `.awk` or `.sed` scripts. `gawk` has a `--lint` mode that might apply.
* Revert "Drastically simplify `lint` scripts"Tom Ryder2017-10-318-35/+19
| | | | | | | | | | | | I forgot that the `lint` tools here need to check the *built* files, and that that's the reason the `perlcritic` check against the source .pl file was failing. While it's still true that it would be preferable to test the files found in a deterministic order, this branch's attempt to address that issue is pretty much nonsense and can be abandoned. This reverts commit 196155499c04b2c2050302e6575f1bcbbed052f1.
* Drastically simplify `lint` scriptsTom Ryder2017-10-318-19/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using find(1) to run the appropriate lint program over a set of files allows us to be terse and deal a little more dynamically with new files placed in the directories, but the downsides are that it's error-prone and that the order of testing is not predictable, and we'd ideally like the testing to be a little more deterministic than that. Case in point: writing the code for this commit unintentionally uncovered a longstanding issue where the URxvt Perl script `select.pl` was actually not being checked at all, due to an unneeded exclamation mark inverting the `-name` test for `*.pl` files. `select.pl` is presently not passing `perlcritic --brutal` on my machine, and likely has not been compliant since as early as commit 5000365 in March this year: >commit 500036564541ff2d65a7b2f6f6f556202d72d6ce >Author: Tom Ryder <tom@sanctum.geek.nz> >Date: Fri Mar 24 11:01:05 2017 > > Lots of Makefile tidying > > ... > * Favour find(1) calls over shell loops > ... This commit also more clearly delineates between the language being "linted" and the target for which it's being linted. The latter is likely more desirable. This needs clarification.
* Add a `lint-vim` target for linting Vim configTom Ryder2017-10-301-0/+5
| | | | | | | | | Since I know there's a usable tool for this now in vim-vint, I may as well make a target for my own convenience later. Updated the README.markdown documentation of the `lint-*` targets, restructuring the paragraph into a nested list for clarity. Also updated the `dotfiles(7)` manual page to reflect those changes.
* Update check/lint shTom Ryder2017-06-181-1/+5
|
* Refactor mpd/ncmpcpp stuff completelyTom Ryder2017-06-181-1/+2
| | | | | | This has been neglected. Switch to per-user mpd process instantiated on login via .profile.d. Cut back ncmpcpp config until I have time to write one that's compatible with 0.8.
* Remove Yash supportTom Ryder2017-05-241-1/+0
| | | | I never use it
* Add xinitrc.d script checksTom Ryder2017-04-091-0/+1
|
* More sh flexibility (check/lint scripts)Tom Ryder2017-04-057-7/+0
|
* Apply runtime shebanging to POSIX shellTom Ryder2017-04-052-20/+2
|
* Clean up lint scripts a bitTom Ryder2016-12-304-4/+6
|
* Remove zsh linterTom Ryder2016-12-301-2/+0
|
* Add zsh checkingTom Ryder2016-12-271-0/+2
|
* Rename all pdksh stuff to kshTom Ryder2016-12-172-2/+2
| | | | As part of a foray into more active use of ksh and derivatives.
* Add very basic Yash supportTom Ryder2016-08-311-0/+2
| | | | | | I know almost nothing about Yash yet, but reading the manual page on its startup behaviour implies a little coaxing is necessary to make it play nicely with my file layout.
* Build URxvt Perls with shb(1)Tom Ryder2016-08-311-1/+1
|
* Tidy check/lint targets, add pdkshTom Ryder2016-08-241-0/+2
|
* Ignore SC1090 (allow unfollowable dotting)Tom Ryder2016-08-232-2/+2
|
* Specify shell dialect for bash/sh lintingTom Ryder2016-08-232-2/+2
|
* Correct lint/bin directoryTom Ryder2016-08-031-1/+1
|
* Restore -f test rather than -e testTom Ryder2016-08-022-2/+2
| | | | Because it prevents testing directories, of course
* Spruce up lint-bin and lint-games scriptsTom Ryder2016-08-022-9/+17
|
* Remove leading blank lineTom Ryder2016-08-021-1/+0
|
* Move tests and lints into their own scriptsTom Ryder2016-08-025-0/+21
Much nicer than having them embedded in the Makefile. Might do this for some of the more complex install targets too. Or maybe all of them ...