Skip to content
New issue

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

Error matching not working? #592

Open
KaneIrving opened this issue Jan 27, 2022 · 2 comments
Open

Error matching not working? #592

KaneIrving opened this issue Jan 27, 2022 · 2 comments

Comments

@KaneIrving
Copy link

KaneIrving commented Jan 27, 2022

Hi, I'm not sure how to get the error matching working my .atom-build.json file looks like:

{
  "cmd": "{PROJECT_PATH}/build.bat",
  "args": [],
  "sh": false,
  "cwd": "{PROJECT_PATH}/code",
  "env": {},
  "errorMatch": (?<file>[a-z]+\.[ch])
}

example error outputs look like:

C:\Users\Kane\Desktop\Game\code\game.c(24): error C2039: 'AspectRatoWidth': is not a member of 'state'
C:\Users\Kane\Desktop\Game\code\game.h(28): note: see declaration of 'state'
C:\Users\Kane\Desktop\Game\code\game.c(25): error C2146: syntax error: missing ';' before identifier 'State'
C:\Users\Kane\Desktop\Game\code\game.c(27): error C2146: syntax error: missing ';' before identifier 'State'

I have tested it on https://regexr.com/ and it correctly gets 4 matches for the file names but in atom it doesn't say any errors and I can't cycle through with the keybinds, it doesn't seem to do anything. I may be missing something obvious as I'm not sure how this works.

@KaneIrving
Copy link
Author

Not really sure what I was doing wrong but I made an .atom-build.yml instead and it works. would still like to know what was wrong with the .json version

@bobemoe
Copy link

bobemoe commented Feb 19, 2023

Possibly an escaping issue? I just used the example from the docs (?<file>[\\/0-9a-zA-Z\\._]+):(?<line>\\d+):(?<col>\\d+):\\s+(?<message>.+) in a yml file and it didnt work. Turns out it doesn't require the double escape and this is the working one: (?<file>[\/0-9a-zA-Z\._]+):(?<line>\d+):(?<col>\d+):\s+(?<message>.+) in yml at least.

Maybe you needed the double escape in json? Just a guess and havent tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants