You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use Neovim as my IDE and the none-ls plugin to generate diagnostics for my Apex and JS files; this enables me to embed issues detected in pmd and eslint into my active buffer so I can easily fix my code.
Ideally, I'd like to remove both pmd and eslint from my workflow and manage everything with code-analyzer commands. This would allow me to take advantage of the new yaml-based configuration file to maintain rules in my codebase.
none-ls allows me to write my own parser for the diagnostics output of code-analyzer run, but currently I am hitting a roadblock because there is no way to simply output the results in JSON format direct to stdout. I could definitely hack together a bash script to do this, but I have to force the code-analyzer run output to be quiet with > /dev/null 2>&1 and do several other operations to print then remove a .json output file. It seems ideal to simply output a --json and handle it that way.
Even better would be a drop-in replacement for pmd or eslint results, so I could just substitute those commands with sf code-analyzer run and have its output already interpreted by existing tools built to read those result formats.
Thoughts on this being desirable functionality for others as well?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I use Neovim as my IDE and the
none-ls
plugin to generate diagnostics for my Apex and JS files; this enables me to embed issues detected inpmd
andeslint
into my active buffer so I can easily fix my code.Ideally, I'd like to remove both
pmd
andeslint
from my workflow and manage everything withcode-analyzer
commands. This would allow me to take advantage of the new yaml-based configuration file to maintain rules in my codebase.none-ls
allows me to write my own parser for the diagnostics output ofcode-analyzer run
, but currently I am hitting a roadblock because there is no way to simply output the results in JSON format direct to stdout. I could definitely hack together a bash script to do this, but I have to force thecode-analyzer run
output to be quiet with> /dev/null 2>&1
and do several other operations to print then remove a.json
output file. It seems ideal to simply output a--json
and handle it that way.Even better would be a drop-in replacement for
pmd
oreslint
results, so I could just substitute those commands withsf code-analyzer run
and have its output already interpreted by existing tools built to read those result formats.Thoughts on this being desirable functionality for others as well?
Beta Was this translation helpful? Give feedback.
All reactions