Skip to content

Commit 8e85673

Browse files
committed
fix: the spell check's findings, and the words this project writes on purpose
The CI's `typos` job reported 50-odd words; the ones that were typos are fixed, and the ones that are not are in `typos.toml` with the reason beside them. **Fixed** — fifteen test names, where `classs` was a possessive written without the apostrophe (`a_classs_member_list…` → `a_class_member_list…`, `…the_enclosing_classs` → `…the_enclosing_class`), and the same mistake in `librarys` → `library`, `entrys` → `entries`, `entitys` → `entity`, `whos` → `whose`; four `unparseable` → `unparsable`, five `summar(ies)` → `summary(ies)`, and two `ype_traits` → `type_traits` in comments quoting a compiler message (the path is truncated there, and the file is `type_traits`). **Allowed, because the token is not English**: * `mis-…` — hyphenated compounds the checker wants to respell as `miss` (`mis-nesting`, `mis-paired`, `mis-served`); * `-Iinclude`, `/Fo`, `PARM` in `_GLIBCXX_NOEXCEPT_PARM`, `_S_nd`, `SEH`/`seh`, `__gam1` — compiler and tool spellings quoted verbatim from real output, where "fixing" them would make the evidence wrong; * `thr` (a CUDA completion prefix, mid-word), `forr` (a snippet trigger), `aanotherVec` (the wrong completion a test asserts about), `__reversable` (a concept a fixture declares); * `IndentWidht`, `exlude`, `standrad` — misspellings that are the *subject* of tests, which assert the error message quotes the bad key back. `cargo check --workspace --all-targets` and `cpp_code_analysis`'s suites are green; the renamed tests are the same tests.
1 parent 6e1629c commit 8e85673

23 files changed

Lines changed: 48 additions & 27 deletions

File tree

‎crates/cpp_code_analysis/src/file/view.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ pub fn might_be_documented(text: &str, offset: usize) -> bool {
546546
//
547547
// Measured, and it is the whole of a net loss that stood for two rounds: dropping unconditionally fixed
548548
// `every_offset_of_the_declaration_reports_it` and `the_declarations_documentation_travels_with_the_signature`
549-
// and lost `a_member_is_not_documented_by_the_classs_comment`,
549+
// and lost `a_member_is_not_documented_by_the_class_comment`,
550550
// `a_member_documented_by_a_nested_comment_is_found_too` and `the_check_never_rejects_a_comment_the_parser_finds`
551551
// (25 passing assertions against 24). The three ask at offsets whose last line is ` /// The n.` — the trace
552552
// this was found with reads:

‎crates/cpp_code_analysis/src/include/config.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,7 @@ mod database_search_path_tests {
13951395
/// **A database entry's own `-I` comes first**, and the compiler's directories after it — the order a compiler
13961396
/// searches, and the reason the fix appends rather than prepends.
13971397
#[test]
1398-
fn the_entrys_own_directories_come_before_the_compilers() {
1398+
fn the_entries_own_directories_come_before_the_compilers() {
13991399
let root = PathBuf::from("/p");
14001400
let file = root.join("src/main.cpp");
14011401
let database = CompileCommands {

‎crates/cpp_code_analysis/src/index/project.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14410,7 +14410,7 @@ mod tests {
1441014410
}
1441114411

1441214412
#[test]
14413-
fn a_member_of_the_standard_librarys_string_resolves_into_basic_string() {
14413+
fn a_member_of_the_standard_library_string_resolves_into_basic_string() {
1441414414
// The case: `basic_string` is where every member is declared, and the
1441514415
// alias's target is written **unqualified** inside `namespace std`, so following it needs the alias's own
1441614416
// scope. Getting that wrong looks up a global `basic_string` and finds nothing.
@@ -15983,7 +15983,7 @@ void f(Derived& d) {
1598315983
}
1598415984

1598515985
#[test]
15986-
fn a_completion_on_this_offers_the_enclosing_classs_members() {
15986+
fn a_completion_on_this_offers_the_enclosing_class_members() {
1598715987
// `this` needs no inference — the scope chain already knows which class it is — which makes it the one
1598815988
// completion inside a class body that works before the object has a name.
1598915989
let source = "struct Widget {\n int size;\n void grow() {\n this->\n }\n};\n";

‎crates/cpp_code_analysis/src/index/references.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ mod tests {
877877
/// every **use** stays — deciding which entity a use belongs to needs that file's scopes, which is a parse this
878878
/// layer does not do (module documentation).
879879
#[test]
880-
fn another_entitys_declaration_of_the_same_spelling_is_not_a_reference() {
880+
fn another_entity_declaration_of_the_same_spelling_is_not_a_reference() {
881881
let files = MemoryFiles::new()
882882
.with_file(
883883
"/p/name.h",

‎crates/cpp_code_analysis/src/session/mod.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3442,7 +3442,7 @@ impl<F: FileProvider + Clone> Session<F> {
34423442
// a caller that calls it twice is asking twice.
34433443
if let Some(collected) = self.collect_the_cache() {
34443444
log::debug!(
3445-
"cache: collected {} summar(ies), {} rendering(s), {} projection(s)",
3445+
"cache: collected {} summary(ies), {} rendering(s), {} projection(s)",
34463446
collected.summaries,
34473447
collected.renderings,
34483448
collected.projections

‎crates/cpp_code_analysis/tests/checks.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1843,7 +1843,7 @@ int main()
18431843
/// today `value_type` is still a name to `convertible_to`, which answers `Unknown`, and a check that cannot compare
18441844
/// says nothing.
18451845
#[test]
1846-
fn a_member_parameter_written_with_the_classs_alias_is_checked() {
1846+
fn a_member_parameter_written_with_the_class_alias_is_checked() {
18471847
let header = "\
18481848
namespace std {
18491849
template <class _Tp>

‎crates/cpp_code_analysis/tests/documentation.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ fn every_offset_of_the_declaration_reports_it() {
8181

8282
/// A class is a declaration, and a member of it is documented by its own comment rather than by the class's.
8383
#[test]
84-
fn a_member_is_not_documented_by_the_classs_comment() {
84+
fn a_member_is_not_documented_by_the_class_comment() {
8585
let source = "/// The class.\nstruct S {\n /// The n.\n int n;\n};\n";
8686

8787
assert_eq!(

‎crates/cpp_code_analysis/tests/generics.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fn type_of_use(source: &str, spelling: &str) -> Option<String> {
7575
/// because no `std::vector` has one. This is the case a reader reported: a hover and a completion that disagreed about
7676
/// the same expression.
7777
#[test]
78-
fn a_member_list_is_the_instantiated_classs() {
78+
fn a_member_list_is_the_instantiated_class() {
7979
let source = format!("{VECTOR}void f() {{\n std::vector<int> z;\n z.\n}}\n");
8080
let offered = members_after(&source, "z.\n");
8181
assert!(
@@ -90,7 +90,7 @@ fn a_member_list_is_the_instantiated_classs() {
9090

9191
/// **The same, through an alias**: `using string = basic_string<char>;` reads as `basic_string<char>` everywhere.
9292
#[test]
93-
fn an_alias_to_an_instantiation_offers_that_classs_members() {
93+
fn an_alias_to_an_instantiation_offers_that_class_members() {
9494
let source = "\
9595
namespace std {
9696
template <class T>

‎crates/cpp_code_analysis/tests/keystroke_probe.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn what_a_keystroke_costs() {
151151

152152
let sizes = session.cache_sizes();
153153
println!(
154-
"cache afterwards: {} summar(ies), {} unit(s), {} fact(s)",
154+
"cache afterwards: {} summary(ies), {} unit(s), {} fact(s)",
155155
sizes.summaries, sizes.units, sizes.facts
156156
);
157157

‎crates/cpp_code_analysis/tests/members_real.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn project() -> Option<PathBuf> {
3434

3535
#[test]
3636
#[ignore = "opens a real project; run with --ignored"]
37-
fn a_classs_member_list_and_its_postings_agree() {
37+
fn a_class_member_list_and_its_postings_agree() {
3838
let Some(project) = project() else {
3939
eprintln!("skipped: no project (set CPPLS_REAL_PROJECT)");
4040
return;

0 commit comments

Comments
 (0)