add new text linter + integrate it with vim
This commit is contained in:
parent
aabb0dadc1
commit
cda3324d86
@ -9,5 +9,7 @@ echo "Install wiki CLI tool"
|
|||||||
npm install -g wikit
|
npm install -g wikit
|
||||||
echo "Install Write-good CLI spell checker"
|
echo "Install Write-good CLI spell checker"
|
||||||
npm install -g write-good
|
npm install -g write-good
|
||||||
|
echo "Install Alex a text linter"
|
||||||
|
npm install -g alex
|
||||||
|
|
||||||
cd "$HOME" || exit
|
cd "$HOME" || exit
|
||||||
|
@ -11,8 +11,9 @@ function suggest_readable_parameters() {
|
|||||||
# TODO : bring support for shell functions aliased to anything providing a real manual
|
# TODO : bring support for shell functions aliased to anything providing a real manual
|
||||||
# e.g : checkov should be taken into account but github should not
|
# e.g : checkov should be taken into account but github should not
|
||||||
# TODO : bring support for backslashed functions (e.g : \egrep)
|
# TODO : bring support for backslashed functions (e.g : \egrep)
|
||||||
|
# FIXME : alex --quiet is not detected
|
||||||
# TODO : support research of command usage when parameters of command appear after command arguments, like : path_swilgt=$(find /usr/local/Cellar/logtalk -name "*swilgt.sh"dev/null)
|
# TODO : support research of command usage when parameters of command appear after command arguments, like : path_swilgt=$(find /usr/local/Cellar/logtalk -name "*swilgt.sh"dev/null)
|
||||||
# TODO : support sub commands like in git ls-tree where ls-tree is a subcommand with its own manual : git ls-tree -r --long
|
# TODO : support sub commands like in git ls-tree where ls-tree is a subcommand with its own manual : git ls-tree -r --long; or npm install -g <package> where -g is a valid option for npm install
|
||||||
|
|
||||||
if [[ $(LC_ALL=C type "$command_name") != *"alias for"* && $(LC_ALL=C type "$command_name") != *"is a shell function"* ]] && [[ $($command_name --help &>/dev/null) -eq 0 || $(info $command_name &>/dev/null) -eq 0 ]]; then
|
if [[ $(LC_ALL=C type "$command_name") != *"alias for"* && $(LC_ALL=C type "$command_name") != *"is a shell function"* ]] && [[ $($command_name --help &>/dev/null) -eq 0 || $(info $command_name &>/dev/null) -eq 0 ]]; then
|
||||||
while read -r command_usage; do
|
while read -r command_usage; do
|
||||||
|
@ -116,7 +116,7 @@ let g:ale_fixers = {
|
|||||||
\ 'zsh' : ['shfmt'],
|
\ 'zsh' : ['shfmt'],
|
||||||
\}
|
\}
|
||||||
|
|
||||||
let g:ale_linters = {'zsh': ['shellcheck'], 'text': ['writegood', 'proselint']}
|
let g:ale_linters = {'zsh': ['shellcheck'], 'text': ['writegood', 'proselint', 'alex']}
|
||||||
|
|
||||||
" when running at every change you may want to disable quickfix
|
" when running at every change you may want to disable quickfix
|
||||||
let g:prettier#quickfix_enabled = 1
|
let g:prettier#quickfix_enabled = 1
|
||||||
|
@ -281,12 +281,13 @@ function invalid_file_refs() {
|
|||||||
# run write-good, proselint, and aspell in non interactive mode, to list all mispelled words found
|
# run write-good, proselint, and aspell in non interactive mode, to list all mispelled words found
|
||||||
function checkenlist() {
|
function checkenlist() {
|
||||||
aspell -d en list < "$1" | sort --unique --ignore-case
|
aspell -d en list < "$1" | sort --unique --ignore-case
|
||||||
write-good "$1" | sort --unique --ignore-case
|
write-good "$1"
|
||||||
proselint "$1" | sort --unique --ignore-case
|
proselint "$1"
|
||||||
|
alex -q --stdin < "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkenremote() {
|
function checkenremote() {
|
||||||
curl --location --insecure --silent "$1" > /tmp/file && checkenlist /tmp/file && write-good /tmp/file && proselint /tmp/file
|
curl --location --insecure --silent "$1" > /tmp/file && checkenlist /tmp/file && write-good /tmp/file && proselint /tmp/file && \cat /tmp/file > alex -q --stdin
|
||||||
}
|
}
|
||||||
|
|
||||||
# Time management
|
# Time management
|
||||||
|
Loading…
Reference in New Issue
Block a user