locked
VS 2012 / FxCop / Spelling RRS feed

  • Question

  • Hi,

    I'm struggling with the custom dictionary.

    I've got a class "OAuthToken" that fires CA1704 because "Auth" is unknown. Basically that's fine.

    The easy fix is to add "Auth" to the recognised words list, but that means "Auth" becomes generally legal. I don't want that. I only want "OAuth" to be a legal term.

    So far I've failed to find a configuration that actually achieves this.

    Any ideas?

    Thanks!

    Cheers,
    M.

    Wednesday, December 5, 2012 11:39 AM

Answers

  • Hi MIrle,

    The specific question is how to configure the dictionary such that "OAuth" is accepted while "Auth" is not.

    Sorry for my misunderstanding about this issue.

    OAuth

    We know that uppercase letters start a new token, for the multiple uppercase letters, the last uppercase letter starts a new token. So OAuth tokenizes to "O", "Auth". So as far as I know it couldn’t achieve it “how to configure the dictionary such that "OAuth" is accepted while "Auth" is not.

    Generally, Visual Studio product team is listening to user voice at http://visualstudio.uservoice.com/forums/121579-visual-studio, you could send your idea there and people can vote. If you submit it, you could share us the link here, I will help you vote it. Thanks for your understanding,

    Have a nice weekend,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, December 7, 2012 3:15 AM
    Moderator
  • Hi Jack,

    Ok, so it's not possible, because the dictionary can't influence how the tokeniser works.

    Thanks!

    Cheers,
    M.

    Friday, December 7, 2012 9:55 AM

All replies

  • Hi MIrle,

    Thank you for posting in the MSDN forum.

    Like this MSDN document “CA1704: Identifiers should be spelled correctly”, to fix a violation of this rule, correct the spelling of the word or add the word to a custom dictionary that is named CustomDictionary.xml. It shared us the useful information about how to customize the Code Analysis Dictionary.

    A blog about this issue, if possible, please refer “CA1704 Code Analysis Warning and Using Custom Dictionaries in Visual Studio”. Hope it could provide useful information.

    Best Regards,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, December 6, 2012 10:24 AM
    Moderator
  • Hi Jack,

    Out of curiosity, did you even read the whole post?

    The specific question is how to configure the dictionary such that "OAuth" is accepted while "Auth" is not.

    Cheers,
    M.

    Thursday, December 6, 2012 2:56 PM
  • Hi MIrle,

    The specific question is how to configure the dictionary such that "OAuth" is accepted while "Auth" is not.

    Sorry for my misunderstanding about this issue.

    OAuth

    We know that uppercase letters start a new token, for the multiple uppercase letters, the last uppercase letter starts a new token. So OAuth tokenizes to "O", "Auth". So as far as I know it couldn’t achieve it “how to configure the dictionary such that "OAuth" is accepted while "Auth" is not.

    Generally, Visual Studio product team is listening to user voice at http://visualstudio.uservoice.com/forums/121579-visual-studio, you could send your idea there and people can vote. If you submit it, you could share us the link here, I will help you vote it. Thanks for your understanding,

    Have a nice weekend,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, December 7, 2012 3:15 AM
    Moderator
  • Hi Jack,

    Ok, so it's not possible, because the dictionary can't influence how the tokeniser works.

    Thanks!

    Cheers,
    M.

    Friday, December 7, 2012 9:55 AM