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

Add overrides for GDScript warning settings to gut_config #605

Open
bitwes opened this issue May 14, 2024 · 0 comments
Open

Add overrides for GDScript warning settings to gut_config #605

bitwes opened this issue May 14, 2024 · 0 comments

Comments

@bitwes
Copy link
Owner

bitwes commented May 14, 2024

Versions

Probably both Godot 3 and 4, at least 4.

The Feature

Add optional overrides for warning settings that will be used when running tests. After some experimentation, I believe these settings can be applied in GutRunner before any other gut scripts or test scripts are loaded. This would help resolve confilicts with users' desired settings and settings that make GUT and GutTest scripts, runnable/less noisy.

Config File Changes

The config file would get an optional "gdscript_warnings" section. Any settings specified in this section will override the settings used by the project prior to loading the rest of GUT. The values for the warnings should be either the numeric value (0/1/2) or a string ("ignore"/"warn"/"error", case insensitive).

Example:

{
  ...
  gdscript_warnings: {
    exclude_addons : true,
    native_method_override : 2,
    redundant_await : "ignore"
  },
  ...
}

GUI Changes

The GutPanel should have a section, or possibly a popup dialog, that allows you to set these values. All settings will be displayed, and the default value is to not override. The current project settings should be displayed next to a drop down for the override value. Through the gui, you would have 4 possible values: do no override, ignore, warn, error. If a popup is used to set the values, then it would be good to display the number of settings that are overridden in the settings panel.

A popup might be required, since I'm not sure if we can detect when project settings are changed. If we cannot, then we will end up stale data in the panel. A popup can refresh values when it is shown.

Technically we could display AND set project settings from the panel/popup. This is probably a bad idea as it might lead to accidental changes or confusion. These values shouldn't be changing a lot so it doesn't add much to be able to change these project settings from the GutPanel.

Command Line Changes

No parameters will be added to the command line, I don't think it adds any value. You'll have to set the values in a gut_config.json file.

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

No branches or pull requests

1 participant