We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to add a linter for Fortran by using gfortran compiler. However, I am not sure how to do it. The linter setting used in vscode is given here: https://github.com/fortran-lang/vscode-fortran-support/blob/main/src/lint/compilers.ts
gfortran
I need help in parsing.
My settings in neovim is given below:
{ "mfussenegger/nvim-lint", config = function() vim.notify("Loading fortran linting", 3, { title = "LazyVim" }) local lint = require("lint") local pattern = [[^([^:]+):(%d+):(%d+):%s+([^:]+):%s+(.*)$]] local groups = { "file", "lnum", "col", "code", "severity", "message" } local severity_map = { ["error"] = vim.diagnostic.severity.ERROR, ["warning"] = vim.diagnostic.severity.WARN, ["performance"] = vim.diagnostic.severity.WARN, ["style"] = vim.diagnostic.severity.INFO, ["information"] = vim.diagnostic.severity.INFO, } local defaults = { ["source"] = "fortran" } lint.linters.gfortran = { name = "gfortran", cmd = "gfortran", args = { "-c", "-Wunused-variable", "-Wunused-dummy-argument", "-Wall", "-I", os.getenv("HOME") .. "/.easifem/install/easifem/extpkgs/include/", os.getenv("HOME") .. "/.easifem/install/easifem/extpkgs/include/toml-f/modules/", os.getenv("HOME") .. "/.easifem/install/easifem/base/include/", os.getenv("HOME") .. "/.easifem/install/easifem/classes/include/", os.getenv("HOME") .. "/.easifem/ide/include/", "-J", os.getenv("HOME") .. "/.easifem/ide/include/", }, -- args to pass to the linter ignore_exitcode = false, -- set this to true if you don't want to show error messages stream = "both", -- set this to "stdout" if the output is not an error, for example with luac parser = require("lint.parser").from_pattern(pattern, groups, severity_map, defaults), } lint.linters_by_ft = { fortran = { "gfortran" } } end, },
The text was updated successfully, but these errors were encountered:
Did you manage to make it work? I'm also interested in enabling a linter for Fortran as well.
Sorry, something went wrong.
No branches or pull requests
I would like to add a linter for Fortran by using
gfortran
compiler.However, I am not sure how to do it. The linter setting used in vscode is given here: https://github.com/fortran-lang/vscode-fortran-support/blob/main/src/lint/compilers.ts
I need help in parsing.
My settings in neovim is given below:
The text was updated successfully, but these errors were encountered: