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

Improve nasl linter #728

Merged
merged 8 commits into from
May 7, 2021
Merged

Conversation

ArnoStiefvater
Copy link
Member

@ArnoStiefvater ArnoStiefvater commented May 5, 2021

What:

Improve linter to catch more undeclared variables.
Imporve linter to continue linting if undeclared variables are detected. More than 1 error can now be logged for a single script.

jira: SC-163

Why:

Improvement.

How:

Checklist:

@ArnoStiefvater ArnoStiefvater requested a review from a team May 5, 2021 07:25
Catch things like `if(!get_port_state(foostateport)){}`
by resetting `defined_var_mode` when setting `defined_fn_mode`.
Variables declared in foreach call are now
considered local variables if there are already
local variables present.
exec_nasl_script now returns the number of errors
the linter finds if no none linting errors occure.
@jjnicola jjnicola merged commit 958e2f1 into greenbone:openvas-21.04 May 7, 2021
ArnoStiefvater added a commit that referenced this pull request May 11, 2021
@Kraemii Kraemii mentioned this pull request Apr 5, 2022
2 tasks
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.

2 participants