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

Change: support error recovery during nasl parsing #1042

Merged
merged 2 commits into from
Mar 1, 2022

Conversation

jjnicola
Copy link
Member

@jjnicola jjnicola commented Feb 23, 2022

What:
Change: support error recovery during nasl parsing
Jira: SC-169

Why:

Now is possible to detect more than one syntax error during the parsing.
Without the patch, only the first error was shown and the file must be parsed once for each error.$ cat linter-test.nasl

How:

For testing, run the following nasl script with openvas-nasl-lint linter-test.nasl

display ("AAAAAA")
a = "1234";
display("bbbbbb")
d = 1234;
display("CCCCCC");
display("DDDDDD);

Checklist:

  • Tests
  • PR merge commit message adjusted

@jjnicola jjnicola requested a review from a team as a code owner February 23, 2022 07:23
@jjnicola jjnicola enabled auto-merge (squash) February 23, 2022 07:23
nichtsfrei
nichtsfrei previously approved these changes Feb 24, 2022
nasl/nasl_grammar.y Outdated Show resolved Hide resolved
Now is possible to detect more than one syntax error during the parsing.
Without the patch, only the first error was shown and the file must be parsed once for each error.$ cat linter-test.nasl

For testing, run the following nasl script with `openvas-nasl-lint linter-test.nasl`

```
display ("AAAAAA")
a = "1234";
display("bbbbbb")
d = 1234;
display("CCCCCC");
display("DDDDDD);
```
@jjnicola jjnicola merged commit b55ffd5 into greenbone:main Mar 1, 2022
mergify bot pushed a commit that referenced this pull request Mar 21, 2022
Now is possible to detect more than one syntax error during the parsing.
Without the patch, only the first error was shown and the file must be parsed once for each error.$ cat linter-test.nasl

For testing, run the following nasl script with `openvas-nasl-lint linter-test.nasl`

```
display ("AAAAAA")
a = "1234";
display("bbbbbb")
d = 1234;
display("CCCCCC");
display("DDDDDD);
```

(cherry picked from commit b55ffd5)

# Conflicts:
#	nasl/nasl_grammar.y
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

Successfully merging this pull request may close these issues.

3 participants