jiller / agentsmithplugin

Automatically exported from code.google.com/p/agentsmithplugin
0 stars 0 forks source link

Bug in spell checking #73

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
  Spell check a .cs code file containing Response.Redirect("mypage.aspx");

What is the expected behavior? What do you see instead?

1)  Agent Smith should take into account this method only accepts URLs, and
therefore should not flag file extensions as spelling errors such as .aspx
and .htm.  

2) This one is less important than #1, but it would be nice to have the
ability to not spell check strings in methods like Redirect.  Something like:
   Flag spelling errors in URLs  No/Warning/Error

What version of ReSharper, Visual Studio and Windows do you use?
 R# 4.0, Windows Server 2003

Thank you for working on a really nice tool.

Original issue reported on code.google.com by whitneyl...@gmail.com on 1 Jul 2008 at 5:39

GoogleCodeExporter commented 8 years ago
One more note:  Regular expressions cannot be used to solve (2) because methods 
like
Response.Redirect take virtual paths, which are not fully qualified URLs.

However it should be possible to note methods that accept virtual paths and 
treat
them accordingly.

thank you.

Original comment by whitneyl...@gmail.com on 1 Jul 2008 at 5:45

GoogleCodeExporter commented 8 years ago
I can't think of a reliable way of detecting such cases.
For example the code could be:

private const string MY_PAGE = "mypage.aspx";
...

Response.Redirect("mypage.aspx");

However I can suggest to add another regular expressions that would feet your 
needs , like (?#partial url)[\w/]*?\.(aspx|html|htm)

Original comment by forever....@gmail.com on 7 Jul 2008 at 10:47

GoogleCodeExporter commented 8 years ago
I think regex solves the problem

Original comment by forever....@gmail.com on 27 Aug 2008 at 11:04