Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: checkout repo before run typos #16601

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ jobs:
- name: download typos
run: curl -LsSf https://github.com/crate-ci/typos/releases/download/$TYPOS_VERSION/typos-$TYPOS_VERSION-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin

- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: check for typos
run: typos

Expand Down
6 changes: 3 additions & 3 deletions crates/hir/src/term_search/tactics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,14 @@ pub(super) fn type_constructor<'a, DB: HirDatabase>(
if ctx.config.enable_borrowcheck && struct_ty.contains_reference(db) {
return None;
}
let fileds = it.fields(db);
let fields = it.fields(db);
// Check if all fields are visible, otherwise we cannot fill them
if fileds.iter().any(|it| !it.is_visible_from(db, module)) {
if fields.iter().any(|it| !it.is_visible_from(db, module)) {
return None;
}

// Early exit if some param cannot be filled from lookup
let param_exprs: Vec<Vec<Expr>> = fileds
let param_exprs: Vec<Vec<Expr>> = fields
.into_iter()
.map(|field| lookup.find(db, &field.ty(db)))
.collect::<Option<_>>()?;
Expand Down
2 changes: 1 addition & 1 deletion crates/ide-completion/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ impl CompletionRelevance {

// When a fn is bumped due to return type:
// Bump Constructor or Builder methods with no arguments,
// over them tha with self arguments
// over them than with self arguments
if fn_score > 0 {
if !asf.has_params {
// bump associated functions
Expand Down
2 changes: 1 addition & 1 deletion crates/rust-analyzer/tests/slow-tests/support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ impl Server {
to_string_pretty(actual_part).unwrap(),
);
} else {
tracing::debug!("sucessfully matched notification");
tracing::debug!("successfully matched notification");
return;
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions crates/salsa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,12 @@ pub trait Query: Debug + Default + Sized + for<'d> QueryDb<'d> {
/// Name of the query method (e.g., `foo`)
const QUERY_NAME: &'static str;

/// Extact storage for this query from the storage for its group.
/// Extract storage for this query from the storage for its group.
fn query_storage<'a>(
group_storage: &'a <Self as QueryDb<'_>>::GroupStorage,
) -> &'a std::sync::Arc<Self::Storage>;

/// Extact storage for this query from the storage for its group.
/// Extract storage for this query from the storage for its group.
fn query_storage_mut<'a>(
group_storage: &'a <Self as QueryDb<'_>>::GroupStorage,
) -> &'a std::sync::Arc<Self::Storage>;
Expand Down
2 changes: 1 addition & 1 deletion crates/salsa/src/lru.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub(crate) trait LruNode: Sized + Debug {

#[derive(Debug)]
pub(crate) struct LruIndex {
/// Index in the approprate LRU list, or std::usize::MAX if not a
/// Index in the appropriate LRU list, or std::usize::MAX if not a
/// member.
index: AtomicUsize,
}
Expand Down
Loading