diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml new file mode 100644 index 0000000..1d3888c --- /dev/null +++ b/.github/workflows/typos.yml @@ -0,0 +1,13 @@ +name: Typos +on: [pull_request] + +jobs: + run: + name: Spell Check + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v4 + + - name: Run Typos + uses: crate-ci/typos@master diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 0000000..38c7ba6 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,14 @@ +# configuration for https://github.com/crate-ci/typos + + +[default.extend-words] +syntact = "syntact" +zhobo = "zhobo" +ratatui = "ratatui" +ba = "ba" # src/components/databases.rs + + +[type.md] +extend-ignore-re = [ + "\\[[[:xdigit:]]{7}\\]\\(https://github.com/ratatui-org/ratatui/commit/[[:xdigit:]]{40}\\)", +] \ No newline at end of file diff --git a/src/components/databases.rs b/src/components/databases.rs index c3c9856..8d9516a 100644 --- a/src/components/databases.rs +++ b/src/components/databases.rs @@ -375,7 +375,7 @@ mod test { } #[test] - fn test_filterd_tree_item_to_span() { + fn test_filtered_tree_item_to_span() { const WIDTH: u16 = 10; assert_eq!( DatabasesComponent::tree_item_to_span( diff --git a/src/components/table.rs b/src/components/table.rs index 40f781e..ec6d7e6 100644 --- a/src/components/table.rs +++ b/src/components/table.rs @@ -148,7 +148,7 @@ impl TableComponent { headers: Vec, database: Database, table: DTable, - hold_cusor_position: bool, + hold_cursor_position: bool, ) { self.selected_row.select(None); if !rows.is_empty() { @@ -157,7 +157,7 @@ impl TableComponent { self.headers = headers; self.rows = rows; self.total_row_count = total_row_count; - self.selected_column = if hold_cusor_position { + self.selected_column = if hold_cursor_position { self.selected_column } else { 0 diff --git a/src/components/table_filter.rs b/src/components/table_filter.rs index 61d127f..26896d5 100644 --- a/src/components/table_filter.rs +++ b/src/components/table_filter.rs @@ -193,7 +193,7 @@ impl Component for TableFilterComponent { fn event(&mut self, key: Key) -> Result { let input_str: String = self.input.iter().collect(); - // apply comletion candidates + // apply completion candidates if key == self.key_config.enter { return self.complete(); }