dbt-labs / dbt-labs/dbt-autofix

Best-effort fix of typos

Open
#9 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
88
Forks
19
Avg merge
1d 1h
Merged PRs (30d)
13

Description

If there's a known key (say, `description`) which is not present in a model but there's a similarly-spelled invalid key present (say, `desciption`), it's probably safe to update the spelling instead of moving it to a config.

"similarly-spelled" is left as an exercise to the implementor, _waves hands wildly_ Levenshtein distance or whatever

Before:
```yml
models:
- name: my_model
desciption: "This is a very useful model which does things" #this is misspelled!

- name: my_second_model
desciption: "idk what this is doing here" # this is misspelled
description: "This is the true descriptor of the model"
```
After:
```yml
models:
- name: my_model
description: "This is a very useful model which does things" # this has been fixed, because there wasn't a competing description key

- name: my_second_model
description: "This is the true descriptor of the model"
config:
meta:
desciption: "idk what this is doing here" #this was moved to config.meta, because there was already a competing correctly-spelled description key.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.