mirror of
https://github.com/neovim/neovim.git
synced 2025-02-05 17:40:29 -06:00
d7426bc9e9
Problem: SpotBugs compiler can be improved
Solution: runtime(compiler): Improve defaults and error handling for
SpotBugs; update test_compiler.vim (Aliaksei Budavei)
runtime(compiler): Improve defaults and error handling for SpotBugs
* Keep "spotbugs#DefaultPreCompilerTestAction()" defined but
do not assign its Funcref to the "PreCompilerTestAction"
key of "g:spotbugs_properties": there are no default and
there can only be introduced arbitrary "*sourceDirPath"
entries; therefore, this assignment is confusing at best,
given that the function's implementation delegates to
whatever "PreCompilerAction" is.
* Allow for the possibility of relative source pathnames
passed as arguments to Vim for the Javac default actions,
and the necessity to have them properly reconciled when
the current working directory is changed.
* Do not expect users to remember or know that new source
files ‘must be’ ":argadd"'d to be then known to the Javac
default actions; so collect the names of Java-file buffers
and Java-file Vim arguments; and let users providing the
"@sources" file-lists in the "g:javac_makeprg_params"
variable update these file-lists themselves.
* Strive to not leave behind a fire-once Syntax ":autocmd"
for a Java buffer whenever an arbitrary pre-compile action
errors out.
* Only attempt to run a post-compiler action in the absence
of failures for a pre-compiler action. Note that warnings
and failures are treated alike (?!) by the Javac compiler,
so when previews are tried out with "--enable-preview",
remember about passing "-Xlint:-preview" too to also let
SpotBugs have a go.
* Properly group conditional operators when testing for key
entries in a user-defined variable.
* Also test whether "javaExternal" is defined when choosing
an implementation for source-file parsing.
* Two commands are provided to toggle actions for buffer-local
autocommands:
- SpotBugsRemoveBufferAutocmd;
- SpotBugsDefineBufferAutocmd.
For example, try this from "~/.vim/after/ftplugin/java.vim":
------------------------------------------------------------
if exists(':SpotBugsDefineBufferAutocmd') == 2
SpotBugsDefineBufferAutocmd BufWritePost SigUSR1
endif
------------------------------------------------------------
And ":doautocmd java_spotbugs User" can be manually used at will.
closes: vim/vim#16140
|
||
---|---|---|
.. | ||
cargo | ||
dist | ||
provider | ||
remote | ||
rust | ||
xml | ||
ada.vim | ||
adacomplete.vim | ||
bitbake.vim | ||
cargo.vim | ||
ccomplete.lua | ||
ccomplete.vim | ||
clojurecomplete.vim | ||
context.vim | ||
contextcomplete.vim | ||
csscomplete.vim | ||
decada.vim | ||
freebasic.vim | ||
gnat.vim | ||
gzip.vim | ||
hare.vim | ||
haskellcomplete.vim | ||
hcl.vim | ||
htmlcomplete.vim | ||
javaformat.vim | ||
javascriptcomplete.vim | ||
modula2.vim | ||
msgpack.vim | ||
paste.vim | ||
phpcomplete.vim | ||
provider.vim | ||
python3complete.vim | ||
python.vim | ||
pythoncomplete.vim | ||
README.txt | ||
RstFold.vim | ||
rubycomplete.vim | ||
rust.vim | ||
rustfmt.vim | ||
shada.vim | ||
spellfile.vim | ||
spotbugs.vim | ||
sqlcomplete.vim | ||
syntaxcomplete.vim | ||
tar.vim | ||
tutor.vim | ||
typst.vim | ||
vimexpect.vim | ||
xmlcomplete.vim | ||
xmlformat.vim | ||
zip.vim |
The autoload directory is for standard Vim autoload scripts. These are functions used by plugins and for general use. They will be loaded automatically when the function is invoked. See ":help autoload". gzip.vim for editing compressed files netrw*.vim browsing (remote) directories and editing remote files tar.vim browsing tar files zip.vim browsing zip files paste.vim common code for mswin.vim and menu.vim spellfile.vim downloading of a missing spell file Omni completion files: ccomplete.vim C csscomplete.vim HTML / CSS htmlcomplete.vim HTML javascriptcomplete.vim Javascript phpcomplete.vim PHP pythoncomplete.vim Python rubycomplete.vim Ruby syntaxcomplete.vim from syntax highlighting xmlcomplete.vim XML (uses files in the xml directory)