neovim/runtime
zeertzjq adeaf17936 vim-patch:9.1.0935: SpotBugs compiler can be improved
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

368ef5a48c

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2024-12-17 09:36:54 +08:00
..
autoload vim-patch:9.1.0935: SpotBugs compiler can be improved 2024-12-17 09:36:54 +08:00
colors fix(runtime): clean up one-off scripts 2024-10-15 20:50:21 +02:00
compiler vim-patch:9.1.0935: SpotBugs compiler can be improved 2024-12-17 09:36:54 +08:00
doc vim-patch:9.1.0935: SpotBugs compiler can be improved 2024-12-17 09:36:54 +08:00
ftplugin vim-patch:9.1.0935: SpotBugs compiler can be improved 2024-12-17 09:36:54 +08:00
indent vim-patch:b66cac1: runtime(typst): add definition lists to formatlistpat, update maintainer 2024-12-10 08:06:35 +01:00
keymap
lua fix(api): generic error messages, not using TRY_WRAP #31596 2024-12-16 08:34:16 -08:00
pack/dist/opt vim-patch:5e7f43b: runtime(termdebug): allow to use decimal signs (#31149) 2024-11-10 09:24:27 +08:00
plugin vim-patch:59834ba: runtime(matchparen): Add matchparen_disable_cursor_hl config option 2024-11-05 08:31:19 +01:00
queries fix(treesitter): update queries 2024-11-22 09:39:45 +01:00
scripts fix(runtime): clean up one-off scripts 2024-10-15 20:50:21 +02:00
spell
syntax vim-patch:b66cac1: runtime(typst): add definition lists to formatlistpat, update maintainer 2024-12-10 08:06:35 +01:00
tutor feat(tutor): give hints to satisfy the line checker #30952 2024-10-27 06:50:17 -07:00
CMakeLists.txt fix(runtime): clean up one-off scripts 2024-10-15 20:50:21 +02:00
delmenu.vim
filetype.lua fix(filetype): make filetype detection work with :doautocmd (#31470) 2024-12-06 20:57:21 +08:00
ftoff.vim
ftplugin.vim
ftplugof.vim
indent.vim
indoff.vim
makemenu.vim
menu.vim
neovim.ico
nvim.appdata.xml
nvim.desktop
nvim.png
optwin.vim vim-patch:9.1.0911: Variable name for 'messagesopt' doesn't match short name 2024-12-08 07:06:16 +08:00
synmenu.vim
windows_icon.rc