vscode-fortran-support
vscode-fortran-support copied to clipboard
[FEAT] Add lfortran as linter
Is there an existing request for this?
- [X] I have searched the existing issues
Feature Request
Add lfortran
as an available linter in vscode-fortran. We want to use the ASR of lfortran and capture it's diagnostic output.
The current limitation is having a standardised plain-text output which can be captured into a vscode.Diagnostic
object.
I need to implement that in lfortran first.
CC @certik
I implemented it here: https://github.com/lfortran/lfortran/pull/47
I think printing it as JSON would be easier, we can implement it next, just let me know.
I implemented it here: lfortran/lfortran#47
I think printing it as JSON would be easier, we can implement it next, just let me know.
Thanks for the quick implementation. I think so too, JSON is inheretly easier to parse in Typescript but I was unsure if the JSON creation has made it into lfortran yet.
The info that we need is: start_line
, start_col
, end_line
, end_col
and message
.
see VSCode API: https://code.visualstudio.com/api/references/vscode-api#Diagnostic
Also, do you think we can do a minor conda release, when this is done, so users can download lfortran with conda?
Ok, we can do JSON as well. Yes we should make a conda release. There is an issue (https://gitlab.com/lfortran/lfortran/-/issues/743) that interactive mode does not work with LLVM 14 yet, and Conda does not have LLVM 11 anymore I think. I'll fix it soon.