spgennard / vscode_cobol

Visual Studio Code Extension for COBOL, JCL and MF Directive Files
MIT License
37 stars 16 forks source link

problem matcher location #305

Closed GitMensch closed 2 years ago

GitMensch commented 2 years ago

as per vscpode docs:

location - If the problem location is line or line,column or startLine,startColumn,endLine,endColumn, then our generic location match group can be used

Doing so simplifies that a bit, uses the documented standard approach (actually works since over 3 years now) and for the ACU/COBOL-IT pattern matchers shows the line to be in error, not the column 1.

GitMensch commented 2 years ago

Updated to resolve conflicts from c1d6ee07b4e34580ce47b4cbd1d3c39e1410a07f

spgennard commented 2 years ago

I am not going to merge these changes, as I believe at least one of the changes is problematic (procobol-preprocessor).

I have made some of the changes to the acu' problem matchers and I am happy that using location in these cases has a benefit, other scenarios I can't see any benefit, so i have done them.

GitMensch commented 2 years ago

I believe at least one of the changes is problematic (procobol-preprocessor)

Totally, that was an error.

I have made some of the changes to the acu' problem matchers and I am happy that using location in these cases has a benefit

I see, 37ecfbfdb20042c09b78c4061a3cae780e6ee6d5 and c09b94b24989ef182e74869dfe104d0dfdd9b8aa. So I guess https://github.com/spgennard/vscode_cobol4gnucobol/pull/11 is good to go then.

other scenarios I can't see any benefit, so i have done them

The end effect will be the same as the others have line and column in both cases. From the vscode docs it seems to me that location is preferred, possibly because it limits the pattern matcher to use 1 group instead of 2, but I'm fine with that in any case.