# NAG compiler linting support VS Code

**URL:** <https://fortran-lang.discourse.group/t/nag-compiler-linting-support-vs-code/3419>\
**Category:** Help\
**Created:** [May 9, 2022, 10:14pm UTC](https://fortran-lang.discourse.group/t/nag-compiler-linting-support-vs-code/3419 "2022-05-09T22:14:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [May 9, 2022, 10:14pm UTC](https://fortran-lang.discourse.group/t/nag-compiler-linting-support-vs-code/3419/1 "2022-05-09T22:14:43Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![themos](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/themos/32/521_2.png) [@themos](https://fortran-lang.discourse.group/u/themos)\
**Post date:** [May 10, 2022, 11:40am UTC](https://fortran-lang.discourse.group/t/nag-compiler-linting-support-vs-code/3419/2 "2022-05-10T11:40:17Z")

</div>

Try “-otype=none”.

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [June 9, 2022, 2:13pm UTC](https://fortran-lang.discourse.group/t/nag-compiler-linting-support-vs-code/3419/3 "2022-06-09T14:13:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [June 19, 2022, 12:22pm UTC](https://fortran-lang.discourse.group/t/nag-compiler-linting-support-vs-code/3419/4 "2022-06-19T12:22:02Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![themos](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/themos/32/521_2.png) [@themos](https://fortran-lang.discourse.group/u/themos)\
**Post date:** [June 19, 2022, 5:28pm UTC](https://fortran-lang.discourse.group/t/nag-compiler-linting-support-vs-code/3419/5 "2022-06-19T17:28:27Z")

</div>

I have left NAG. Try [support@nag.co.uk](mailto:support@nag.co.uk)

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

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [June 24, 2022, 4:08pm UTC](https://fortran-lang.discourse.group/t/nag-compiler-linting-support-vs-code/3419/6 "2022-06-24T16:08:35Z")

</div>

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!
