Skip to content

Allow opt-in configuration to invert require-timeout-settingsΒ #678

@Taylor-Mudd-9fin

Description

@Taylor-Mudd-9fin

Hey folks,

A recent change went in here to force timeout settings to be present in each file that is linted (here).

This doesn't quite work for our use case as with our schema migration tool we can configure a script to run before each migration (within the same transaction) and that is where we configure our statement and lock timeouts as a standard. As it stands this case wouldn't be supported by this rule and we'd be forced to ignore it in almost every migration file we want to run.

I want to propose a modification to allow some config to invert the rule to trigger a linting error if these statements are present in the file (i.e. someone has changed these values from a default) and then they'd be forced to ignore it. This would be opt-in configuration so the default would still be as it is now, but extended to meet our use case as we've got these timeouts already set for all migrations.

We'd be maintaining the tool's existing high regard of locks as a safety mechanism but allowing other users in our situation to avoid "ignore fatigue" when reviewing migration changes.

Let me know what you think!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions