Test that rules have default configuration with level.
()
| 411 | |
| 412 | |
| 413 | def test_sarif_default_configuration(): |
| 414 | """Test that rules have default configuration with level.""" |
| 415 | sarif = run_sarif_check(BASIC_TEST_CODE) |
| 416 | |
| 417 | run = sarif["runs"][0] |
| 418 | driver = run["tool"]["driver"] |
| 419 | rules = driver["rules"] |
| 420 | |
| 421 | for rule in rules: |
| 422 | # Check for defaultConfiguration.level (#13885) |
| 423 | assert "defaultConfiguration" in rule |
| 424 | assert "level" in rule["defaultConfiguration"] |
| 425 | |
| 426 | level = rule["defaultConfiguration"]["level"] |
| 427 | assert level in ["error", "warning", "note", "none"] |
| 428 | |
| 429 | |
| 430 | def test_sarif_rule_properties(): |
nothing calls this directly
no test coverage detected