Skip to content

Commit

Permalink
Merge pull request #102 from kyoto7250/add_typos
Browse files Browse the repository at this point in the history
add typos setting
  • Loading branch information
kyoto7250 authored Jul 31, 2024
2 parents 4d92776 + d50239c commit 29331c7
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -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}\\)",
]
2 changes: 1 addition & 1 deletion src/components/databases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions src/components/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl TableComponent {
headers: Vec<String>,
database: Database,
table: DTable,
hold_cusor_position: bool,
hold_cursor_position: bool,
) {
self.selected_row.select(None);
if !rows.is_empty() {
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/components/table_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl Component for TableFilterComponent {
fn event(&mut self, key: Key) -> Result<EventState> {
let input_str: String = self.input.iter().collect();

// apply comletion candidates
// apply completion candidates
if key == self.key_config.enter {
return self.complete();
}
Expand Down

0 comments on commit 29331c7

Please sign in to comment.