Mercurial > vim
view runtime/compiler/stylelint.vim @ 34116:805808a558cf v9.1.0022
patch 9.1.0022: Coverity complains about improper use of negative value
Commit: https://github.com/vim/vim/commit/49471963fefbdf78239d9066d84e14e1876fb177
Author: Christian Brabandt <cb@256bit.org>
Date: Fri Jan 12 17:48:08 2024 +0100
patch 9.1.0022: Coverity complains about improper use of negative value
Problem: Coverity complains about improper use of negative value
Solution: Add a condition to validate that keytyped is larger or equal
to 0
Apparently patch 9.1.0006 made it more explicit for Coverity, that the
TOLOWER_LOC() macros do not handle negative values properly. However,
that condition has always been there even before that, so add a
condition to verify that keytyped is indeed at least 0
closes: #13824
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 12 Jan 2024 18:00:04 +0100 |
parents | 0db0640e16e0 |
children | e1df51f68736 |
line wrap: on
line source
" Vim compiler file " Compiler: Stylelint " Maintainer: Doug Kearns <dougkearns@gmail.com> " Last Change: 2020 Jun 10 if exists("current_compiler") finish endif let current_compiler = "stylelint" if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif let s:cpo_save = &cpo set cpo&vim " CompilerSet makeprg=npx\ stylelint\ --formatter\ compact CompilerSet makeprg=stylelint\ --formatter\ compact CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %trror\ -\ %m, \%f:\ line\ %l\\,\ col\ %c\\,\ %tarning\ -\ %m, \%-G%.%# let &cpo = s:cpo_save unlet s:cpo_save