Feature request: Find unreferenced code

Within a solution, there should be a way to find any code/classes that
aren't referenced by anything else. This would help find dead code that's
otherwise hard to find... (find usages on every public type...).

8 comments
Comment actions Permalink

Hello Oren,

This is planned to be part of the next major release after ReSharper 4, like
globally unused members highlighting, interface never implemented, virtual
member never overriden, etc.

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


ON> Within a solution, there should be a way to find any code/classes
ON> that aren't referenced by anything else. This would help find dead
ON> code that's otherwise hard to find... (find usages on every public
ON> type...).
ON>


0
Comment actions Permalink

Cool, thanks!

"Ilya Ryzhenkov" <orangy@jetbrains.com> wrote in message
news:76a2bd0b1564be8ca75dd75032ead@news.intellij.net...

Hello Oren,

>

This is planned to be part of the next major release after ReSharper 4,
like globally unused members highlighting, interface never implemented,
virtual member never overriden, etc.

>

Sincerely,
Ilya Ryzhenkov

>

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>

ON> Within a solution, there should be a way to find any code/classes
ON> that aren't referenced by anything else. This would help find dead
ON> code that's otherwise hard to find... (find usages on every public
ON> type...).
ON>


0
Comment actions Permalink

Will we be able to toggle this per solution? I ask because our product is
huge, and nobody here developes in a solution where ALL projects are loaded
at once. Everyone has a solution with either just the project (and its
direct dependents) is loaded, or a custom solution with just the projects
the developer generally works in are loaded. I wouldn't want to be forced
to see tons of false warnings because of that, or be forced to load up lots
of unneeded projects because of that.

This probably isn't a huge issue, but I just want to be clear about how it's
going to be working.

"Ilya Ryzhenkov" <orangy@jetbrains.com> wrote in message
news:76a2bd0b1564be8ca75dd75032ead@news.intellij.net...

Hello Oren,

>

This is planned to be part of the next major release after ReSharper 4,
like globally unused members highlighting, interface never implemented,
virtual member never overriden, etc.

>

Sincerely,
Ilya Ryzhenkov

>

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>

ON> Within a solution, there should be a way to find any code/classes
ON> that aren't referenced by anything else. This would help find dead
ON> code that's otherwise hard to find... (find usages on every public
ON> type...).
ON>


0
Comment actions Permalink

Hello Paul,

Current prototype integrates with regular analysis engine and just shows
public symbols as gray if they are not used. It is not yet defined how final
version will work, how global view will look like and so on. We are developing
underlying technology, which is partially exposed with solution wide error
analysis feature. Those warnings are regular warnings and their severity
can be changed, or they can be disabled.

Of course, such analysis is possible only for self-contained solutions. Any
library developer will want most of such warnings off, or probably mark public
API classes with special attributes. We can discuss it in more details later
in next release cycle, when we will plan feature set for next major version
(ReSharper 5?).

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


PB> Will we be able to toggle this per solution? I ask because our
PB> product is huge, and nobody here developes in a solution where ALL
PB> projects are loaded at once. Everyone has a solution with either
PB> just the project (and its direct dependents) is loaded, or a custom
PB> solution with just the projects the developer generally works in are
PB> loaded. I wouldn't want to be forced to see tons of false warnings
PB> because of that, or be forced to load up lots of unneeded projects
PB> because of that.
PB>
PB> This probably isn't a huge issue, but I just want to be clear about
PB> how it's going to be working.
PB>
PB> "Ilya Ryzhenkov" <orangy@jetbrains.com> wrote in message
PB> news:76a2bd0b1564be8ca75dd75032ead@news.intellij.net...
PB>
>> Hello Oren,
>>
>> This is planned to be part of the next major release after ReSharper
>> 4, like globally unused members highlighting, interface never
>> implemented, virtual member never overriden, etc.
>>
>> Sincerely,
>> Ilya Ryzhenkov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>> ON> Within a solution, there should be a way to find any code/classes
>> ON> that aren't referenced by anything else. This would help find
>> dead
>> ON> code that's otherwise hard to find... (find usages on every
>> public
>> ON> type...).
>> ON>


0
Comment actions Permalink

Since not everyone in our shop uses Resharper (it's a personal choice, and
right now, the problems with websites make it unusable for most of our
team), I'd rather avoid solutions that require cluttering up our code with
attributes (this same issue arises in the NULL/NOT NULL analysis stuff).

It might be nice to have solution level "named profiles" so I could easily
select a set of settings for a library project vs. a fully self-contained
solution, etc. This would allow quickly setting up dozens of options by
just selecting a name or profile from a drop-down list. Just an idea.

"Ilya Ryzhenkov" <orangy@jetbrains.com> wrote in message
news:76a2bd0b15665a8ca7788e1779389@news.intellij.net...

Hello Paul,

>

Current prototype integrates with regular analysis engine and just shows
public symbols as gray if they are not used. It is not yet defined how
final version will work, how global view will look like and so on. We are
developing underlying technology, which is partially exposed with solution
wide error analysis feature. Those warnings are regular warnings and their
severity can be changed, or they can be disabled.
Of course, such analysis is possible only for self-contained solutions.
Any library developer will want most of such warnings off, or probably
mark public API classes with special attributes. We can discuss it in more
details later in next release cycle, when we will plan feature set for
next major version (ReSharper 5?).

>

Sincerely,
Ilya Ryzhenkov

>

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>

PB> Will we be able to toggle this per solution? I ask because our
PB> product is huge, and nobody here developes in a solution where ALL
PB> projects are loaded at once. Everyone has a solution with either
PB> just the project (and its direct dependents) is loaded, or a custom
PB> solution with just the projects the developer generally works in are
PB> loaded. I wouldn't want to be forced to see tons of false warnings
PB> because of that, or be forced to load up lots of unneeded projects
PB> because of that.
PB> PB> This probably isn't a huge issue, but I just want to be clear
about
PB> how it's going to be working.
PB> PB> "Ilya Ryzhenkov" <orangy@jetbrains.com> wrote in message
PB> news:76a2bd0b1564be8ca75dd75032ead@news.intellij.net...
PB>

>>> Hello Oren,
>>>
>>> This is planned to be part of the next major release after ReSharper
>>> 4, like globally unused members highlighting, interface never
>>> implemented, virtual member never overriden, etc.
>>>
>>> Sincerely,
>>> Ilya Ryzhenkov
>>> JetBrains, Inc
>>> http://www.jetbrains.com
>>> "Develop with pleasure!"
>>> ON> Within a solution, there should be a way to find any code/classes
>>> ON> that aren't referenced by anything else. This would help find
>>> dead
>>> ON> code that's otherwise hard to find... (find usages on every
>>> public
>>> ON> type...).
>>> ON>
>


0
Comment actions Permalink

Hello Paul,

In ReSharper 4 we refactored support for ASP.NET so it should be much more
responsive. Is it the case for you, does ReSharper 4 behaves faster on your
ASP.NET solutions?

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


PB> Since not everyone in our shop uses Resharper (it's a personal
PB> choice, and right now, the problems with websites make it unusable
PB> for most of our team), I'd rather avoid solutions that require
PB> cluttering up our code with attributes (this same issue arises in
PB> the NULL/NOT NULL analysis stuff).
PB>
PB> It might be nice to have solution level "named profiles" so I could
PB> easily select a set of settings for a library project vs. a fully
PB> self-contained solution, etc. This would allow quickly setting up
PB> dozens of options by just selecting a name or profile from a
PB> drop-down list. Just an idea.
PB>
PB> "Ilya Ryzhenkov" <orangy@jetbrains.com> wrote in message
PB> news:76a2bd0b15665a8ca7788e1779389@news.intellij.net...
PB>
>> Hello Paul,
>>
>> Current prototype integrates with regular analysis engine and just
>> shows
>> public symbols as gray if they are not used. It is not yet defined
>> how
>> final version will work, how global view will look like and so on. We
>> are
>> developing underlying technology, which is partially exposed with
>> solution
>> wide error analysis feature. Those warnings are regular warnings and
>> their
>> severity can be changed, or they can be disabled.
>> Of course, such analysis is possible only for self-contained
>> solutions.
>> Any library developer will want most of such warnings off, or
>> probably
>> mark public API classes with special attributes. We can discuss it in
>> more
>> details later in next release cycle, when we will plan feature set
>> for
>> next major version (ReSharper 5?).
>> Sincerely,
>> Ilya Ryzhenkov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>> PB> Will we be able to toggle this per solution? I ask because our
>> PB> product is huge, and nobody here developes in a solution where
>> ALL
>> PB> projects are loaded at once. Everyone has a solution with either
>> PB> just the project (and its direct dependents) is loaded, or a
>> custom
>> PB> solution with just the projects the developer generally works in
>> are
>> PB> loaded. I wouldn't want to be forced to see tons of false
>> warnings
>> PB> because of that, or be forced to load up lots of unneeded
>> projects
>> PB> because of that.
>> PB> PB> This probably isn't a huge issue, but I just want to be clear
>> about
>> PB> how it's going to be working.
>> PB> PB> "Ilya Ryzhenkov" <orangy@jetbrains.com> wrote in message
>> PB> news:76a2bd0b1564be8ca75dd75032ead@news.intellij.net...
>> PB>
>>>> Hello Oren,
>>>>
>>>> This is planned to be part of the next major release after
>>>> ReSharper 4, like globally unused members highlighting, interface
>>>> never implemented, virtual member never overriden, etc.
>>>>
>>>> Sincerely,
>>>> Ilya Ryzhenkov
>>>> JetBrains, Inc
>>>> http://www.jetbrains.com
>>>> "Develop with pleasure!"
>>>> ON> Within a solution, there should be a way to find any
>>>> code/classes
>>>> ON> that aren't referenced by anything else. This would help find
>>>> dead
>>>> ON> code that's otherwise hard to find... (find usages on every
>>>> public
>>>> ON> type...).
>>>> ON>


0
Comment actions Permalink

I haven't yet tried 4.0 for a variety of reasons (one, I don't do any real
work with websites, so Resharper 3.1 works just fine for me, two, serious
deadlines for the next few weeks, and three, I was waiting for a more stable
version to have a guinea pig here try it out :-).

I'm currently using a 3.1 nightly build. When I attempt to load a solution
containing our website, it locks VS2008 hard, pegging the CPU at 100%, and
stays that way for 10-15 minutes the first time, and well over 5 minutes
thereafter. That is seriously painful, especially given another issue where
when our external build utility is run to rebuild a bunch of dependent
projects and DLLs, Resharper seems to lose track of all updated references,
and everything goes red, requiring that VS2008 be closed and then
reopened... in addition to out of memory errors that happened all the time.
The "Out of Memory" fix you have linked on the build page works though, so I
have one person willing to put up with the pain for now... but it's still
painful.

I don't experience any of these problems or issues because I do not
routinely use websites.

I will work to test 4.0 as soon as it's feasable for me to do so, and will
let you know what progress has been made.

"Ilya Ryzhenkov" <orangy@jetbrains.com> wrote in message
news:76a2bd0b1568078ca784f4398b5d7@news.intellij.net...

Hello Paul,

>

In ReSharper 4 we refactored support for ASP.NET so it should be much more
responsive. Is it the case for you, does ReSharper 4 behaves faster on
your ASP.NET solutions?

>

Sincerely,
Ilya Ryzhenkov

>

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>

PB> Since not everyone in our shop uses Resharper (it's a personal
PB> choice, and right now, the problems with websites make it unusable
PB> for most of our team), I'd rather avoid solutions that require
PB> cluttering up our code with attributes (this same issue arises in
PB> the NULL/NOT NULL analysis stuff).
PB> PB> It might be nice to have solution level "named profiles" so I
could
PB> easily select a set of settings for a library project vs. a fully
PB> self-contained solution, etc. This would allow quickly setting up
PB> dozens of options by just selecting a name or profile from a
PB> drop-down list. Just an idea.
PB> PB> "Ilya Ryzhenkov" <orangy@jetbrains.com> wrote in message
PB> news:76a2bd0b15665a8ca7788e1779389@news.intellij.net...
PB>

>>> Hello Paul,
>>>
>>> Current prototype integrates with regular analysis engine and just
>>> shows
>>> public symbols as gray if they are not used. It is not yet defined
>>> how
>>> final version will work, how global view will look like and so on. We
>>> are
>>> developing underlying technology, which is partially exposed with
>>> solution
>>> wide error analysis feature. Those warnings are regular warnings and
>>> their
>>> severity can be changed, or they can be disabled.
>>> Of course, such analysis is possible only for self-contained
>>> solutions.
>>> Any library developer will want most of such warnings off, or
>>> probably
>>> mark public API classes with special attributes. We can discuss it in
>>> more
>>> details later in next release cycle, when we will plan feature set
>>> for
>>> next major version (ReSharper 5?).
>>> Sincerely,
>>> Ilya Ryzhenkov
>>> JetBrains, Inc
>>> http://www.jetbrains.com
>>> "Develop with pleasure!"
>>> PB> Will we be able to toggle this per solution? I ask because our
>>> PB> product is huge, and nobody here developes in a solution where
>>> ALL
>>> PB> projects are loaded at once. Everyone has a solution with either
>>> PB> just the project (and its direct dependents) is loaded, or a
>>> custom
>>> PB> solution with just the projects the developer generally works in
>>> are
>>> PB> loaded. I wouldn't want to be forced to see tons of false
>>> warnings
>>> PB> because of that, or be forced to load up lots of unneeded
>>> projects
>>> PB> because of that.
>>> PB> PB> This probably isn't a huge issue, but I just want to be clear
>>> about
>>> PB> how it's going to be working.
>>> PB> PB> "Ilya Ryzhenkov" <orangy@jetbrains.com> wrote in message
>>> PB> news:76a2bd0b1564be8ca75dd75032ead@news.intellij.net...
>>> PB>
>>>>> Hello Oren,
>>>>>
>>>>> This is planned to be part of the next major release after
>>>>> ReSharper 4, like globally unused members highlighting, interface
>>>>> never implemented, virtual member never overriden, etc.
>>>>>
>>>>> Sincerely,
>>>>> Ilya Ryzhenkov
>>>>> JetBrains, Inc
>>>>> http://www.jetbrains.com
>>>>> "Develop with pleasure!"
>>>>> ON> Within a solution, there should be a way to find any
>>>>> code/classes
>>>>> ON> that aren't referenced by anything else. This would help find
>>>>> dead
>>>>> ON> code that's otherwise hard to find... (find usages on every
>>>>> public
>>>>> ON> type...).
>>>>> ON>
>


0

Please sign in to leave a comment.