NAG compiler linting support VS Code

I am thinking of adding support for the NAG compiler in VS Code Modern Fortran. I was very pleased in the short time I used it (back when we were trying to make a purely compile-time Eratosthenes sieve), where nagfor was the only scalable solution.

Before starting to implement this I wanted to check if it is at all possible. Does nagfor have a flag similar to gfortran and ifort for only checking for valid syntax i.e. -fsyntax-only? Is -dryrun the flag I am looking for?

1 Like

Try “-otype=none”.

1 Like

Only just got around at renewing my license for nagfor. Thanks @themos it works!

I was curious about a couple more things in case you have an asnwer;

  1. Is there a way to get the column location of an error? (in addition to the line number)
  2. is there a way to not line-wrap the compiler output?

I have left NAG. Try

From memory, the first answer is no and the second answer is use a filter script on the stderr of the compiler.

Thanks @themos. I have actually already been in contact with them for some months now but still you provided the most insightful comments out of all. I have a working, but crude when compared to gfortran or ifort version of the linter. Will publish it in the next coming weeks.

Thanks for the help!