Giter Site home page Giter Site logo

wecantspell.roslyn's Introduction

WeCantSpell.Roslyn

WeCantSpell.Roslyn is a spell check analyzer for Roslyn languages, such as C# and Visual Basic. It uses WeCantSpell.Hunspell, a fully managed C# port of the Hunspell spell checker engine, to check and suggest words.

Features

  • Reads Hunspell DIC and AFF file formats
  • Supports checking and suggesting words
  • Can be queried concurrently
  • Compatible with .NET Core, .NET Standard and multiple .NET framework versions

Installation

You can install WeCantSpell.Roslyn as a NuGet package using the following command:

dotnet add package WeCantSpell.Roslyn

Configuration

To use WeCantSpell.Roslyn, you need to configure the analyzer options in your project. There are two ways to do this:

  • Using .wecantspell or .wecantspell.json files, located in the project root or inside nested directories. The structure of the file is as follows:
{
    "isRoot" : true,
    "languages" : [
        "en-US",
        "ru-RU"
    ]
}

The isRoot property indicates whether the file is located in the solution root or not. The languages property specifies the list of languages to use for spell checking.

  • Using additional project dictionaries in Hunspell format, named one of: .spelling.dic, .directory.dic, .wecantspell.dic. These files can also be located in the project root or inside nested directories. They contain custom words to add to the spell checker.

You also need to set the severity of the analyzer diagnostics in your editorconfig file. For example:

root = true

[*.{cs,vb}]
# WeCantSpell properties
dotnet_diagnostic.SP3110.severity = warning
dotnet_diagnostic.SP3111.severity = suggestion
dotnet_diagnostic.SP3112.severity = suggestion
dotnet_diagnostic.SP3113.severity = suggestion

The analyzer will report spelling errors in your code according to the following error codes:

  • SP3110: Identifier Spelling - Identifier name may contain a spelling error.
  • SP3111: Text Literal Spelling - Text literal may contain a spelling error.
  • SP3112: Comment Spelling - Comment may contain a spelling error.
  • SP3113: Xml Documentation Spelling - Xml documentation may contain a spelling error.

For more details, please refer to the source code of the project.

wecantspell.roslyn's People

Contributors

aarondandy avatar pk-raidsoft avatar rpsft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ebrahimi-esf

wecantspell.roslyn's Issues

Code fix adds multiple copies of a word to the dictionary

After a single fix we have multiple entries like below:

attr
attr
serializer
serializer
serializer
xmla
xmla
xmla
Xmla
Xmla
Xmla
Const
Const
Const
OON
OON
OON
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxyz
Renderer
Renderer
Renderer
Func
Func
Func

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.