Skip to content

Move default_severity to the class level - #1006

Merged
vinistock merged 1 commit into
mainfrom
vs_move_default_severity_to_class_level
Aug 14, 2026
Merged

Move default_severity to the class level#1006
vinistock merged 1 commit into
mainfrom
vs_move_default_severity_to_class_level

Conversation

@vinistock

Copy link
Copy Markdown
Member

Second step for #1000

For unifying graph and linter diagnostics, having the default severity be an instance method is
inconvenient because it would force graph rules to have to be instantiated with a graph and config object.

Graph rules only hold a unique name and default severity, so moving this to the class level makes it easier to create a consistent model across the entire codebase. Conceptually, it's almost correct as the default severity belongs to the definition of a rule and not its execution (instance).

We don't really lose anything in terms of type safety because we can still declare the singleton method as abstract.

For unifying graph and linter diagnostics, having
the default severity be an instance method is
inconvenient because it would force graph rules
to have to be instantiated with a graph and config
object. Graph rules only hold a unique name and
default severity, so moving this to the class level
makes it easier to create a consistent model across
the entire codebase.
@vinistock vinistock self-assigned this Aug 14, 2026
@vinistock
vinistock requested a review from a team as a code owner August 14, 2026 15:45
@vinistock
vinistock merged commit 83c8811 into main Aug 14, 2026
30 checks passed
@vinistock
vinistock deleted the vs_move_default_severity_to_class_level branch August 14, 2026 16:12
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