Update Linter for Windows #10
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was having some problems getting the gfortran-based linter to work on Windows 10 so I took a stab at fixing the problems.
Issues:
fortran.includePaths
thengfortran
to complains about no input files and exitserrorRegex
fails to matchgfortran
output so no errors are displayedChanges:
getIncludeParams
function insrc/lib/helper.ts
to check for thepaths
variable having a length of 0. In this case the function returns""
instead of"-I "
. The empty argument will then be removed byconstructArgumentList
insrc/features/linter-provider.ts
.errorRegex
insrc/features/linter-provider.ts
to allow for upper and lowercase drive names on Windows and to match all space between output lines via\s+
instead of just\n
. The change to matching space should allow the regex to work regardless of the operating system using carriage returns or not.I ran the extension tests on my Windows 10 computer and all 13 passed. Unfortunately, I don't have quick access to a linux system for testing, but I can create a VM if necessary.