Skip to content
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
4 changes: 4 additions & 0 deletions crates/codebook/src/dictionaries/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ static TEXT_DICTIONARIES: LazyLock<Vec<TextRepo>> = LazyLock::new(|| {
text: Some(CODEBOOK_DICTIONARY),
url: None,
},
TextRepo::new(
"csharp",
"https://raw.githubusercontent.com/streetsidesoftware/cspell-dicts/refs/heads/main/dictionaries/csharp/csharp.txt",
),
]
});

Expand Down
4 changes: 3 additions & 1 deletion crates/codebook/src/queries/csharp.scm
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@
(identifier) @identifier)

; String literals
(interpolated_string_expression
(string_content) @string)

[
(string_literal)
(raw_string_literal)
(verbatim_string_literal)
(interpolated_string_expression)
] @string
22 changes: 22 additions & 0 deletions examples/example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@
using System.Collections.Generic;
using System.Linq;


[DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")]
internal class Program
{
private static void Main(string[] args)
{
// Incorrectly flagged
Console.WriteLine($"Hellooo, {nameof(Program)}!");

// Incorrectly flagged
Console.WriteLine(
$$"""
Hello {{nameof(Program)}}!
""");
}
private string GetDebuggerDisplay()
{
// OK
return nameof(Program);
}
}

namespace SpellcheckDemoo
{
// Interface with a mispelled name/methodd
Expand Down