Skip to content

Commit

Permalink
Add typos check to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kilpkonn committed May 31, 2024
1 parent ca8cc1a commit 408b91b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,16 @@ jobs:
run: ci/valgrind-check/run.sh
shell: bash

typos:
name: Typos Check
runs-on: ubuntu-latest
steps:
- name: Clone this repository
uses: actions/checkout@v4

- name: Check spelling
uses: crate-ci/typos@master

# NOTE: In GitHub repository settings, the "Require status checks to pass
# before merging" branch protection rule ensures that commits are only merged
# from branches where specific status checks have passed. These checks are
Expand All @@ -141,7 +151,7 @@ jobs:
ci:
name: CI status checks
runs-on: ubuntu-latest
needs: [check, test, valgrind]
needs: [check, test, valgrind, typos]
if: always()
steps:
- name: Check whether all jobs pass
Expand Down
2 changes: 2 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[files]
extend-exclude = [
# Ignore all files in transport tests as they contain
# hashes that are treated as typos.
"io/zenoh-transport/tests/*.rs",
]

Expand Down
2 changes: 1 addition & 1 deletion io/zenoh-transport/tests/unicast_transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use zenoh_transport::{
TransportPeerEventHandler,
};

// These keys and certificates below are purposedly generated to run TLS and mTLS tests.
// These keys and certificates below are purposely generated to run TLS and mTLS tests.
//
// With 2 way authentication (mTLS), using TLS 1.3, we need two pairs of keys and certificates: one
// for the "server" and another one for the "client".
Expand Down
3 changes: 2 additions & 1 deletion zenoh/src/net/routing/hat/linkstate_peer/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,8 @@ impl Network {
let indexes = self.graph.node_indices().collect::<Vec<NodeIndex>>();
let max_idx = indexes.iter().max().unwrap();

let old_children: Vec<Vec<NodeIndex>> = self.trees.iter().map(|t| t.children.clone()).collect();
let old_children: Vec<Vec<NodeIndex>> =
self.trees.iter().map(|t| t.children.clone()).collect();

self.trees.clear();
self.trees.resize_with(max_idx.index() + 1, || Tree {
Expand Down
3 changes: 2 additions & 1 deletion zenoh/src/net/routing/hat/router/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,8 @@ impl Network {
let indexes = self.graph.node_indices().collect::<Vec<NodeIndex>>();
let max_idx = indexes.iter().max().unwrap();

let old_children: Vec<Vec<NodeIndex>> = self.trees.iter().map(|t| t.children.clone()).collect();
let old_children: Vec<Vec<NodeIndex>> =
self.trees.iter().map(|t| t.children.clone()).collect();

self.trees.clear();
self.trees.resize_with(max_idx.index() + 1, || Tree {
Expand Down

0 comments on commit 408b91b

Please sign in to comment.