Sorry, package was wrong - it was from previous internal build. If you have MassFixTest.cs file in source\Netix.Nerpa.Test\ subfolder, please redownload the package.
I was trying to modify your plugin to enable the generic checking of FxCop rules (but stranded with lack of time and documentation of FxCop), do you think it would it be possible (not asking u to do it, just an opinion) to adapt your plugin to enable such a feature, and allow people to add their own resolving classes/methods (automatically add COMVisible attribute, etc etc), for each FxCop rule?
Combined with Resharper being able to batch-resolve each possible warning in a complete project, that would make a nice tool don't you think?
Wiebe
Ilya Ryzhenkov wrote:
Sorry, package was wrong - it was from previous internal build. If you have MassFixTest.cs file in source\Netix.Nerpa.Test\ subfolder, please redownload the package.
I afraid it's not possible to use FxCop rule libraries. First, they operate on compiled assembly and thus does not have to deal with incomplete code. Second, they use completely different API which would be hard yet even possible to adopt for Resharper. Third, they don't contain code for correcting problems, which is the most important thing in Resharper context. And the last - there are a lot of false positives which requires mechanism for excluding warnings.
I think we'd better wait until JetBrains setup workplace for plugins and then reimplement most important rules along with quickfixes. For example, I don't think that assembly-level attributes checks are important rules. If they even were implemented, you'd almost never see it - how often do you open AssemblyInfo.cs file? If you browse FxCop rules, you will see that most of them are not suitable for Resharper.
On exclusions: I realise, that tool like Nerpa should have some method for ignoring suggestions. I'm working on it.
Sincerely, Ilya Ryzhenkov
WT> Hi Ilya, WT> WT> I was trying to modify your plugin to enable the generic checking of WT> FxCop rules (but stranded with lack of time and documentation of WT> FxCop), do you think it would it be possible (not asking u to do it, WT> just an opinion) to adapt your plugin to enable such a feature, and WT> allow people to add their own resolving classes/methods WT> (automatically add COMVisible attribute, etc etc), for each FxCop WT> rule? WT> WT> Combined with Resharper being able to batch-resolve each possible WT> warning in a complete project, that would make a nice tool don't you WT> think? WT> WT> Wiebe WT> WT> Ilya Ryzhenkov wrote: WT> >> Sorry, package was wrong - it was from previous internal build. If >> you have MassFixTest.cs file in source\Netix.Nerpa.Test\ subfolder, >> please redownload the package. >> >> http://users.netix.ru/orangy/nerpa/ >> >> Sincerely, >> Ilya Ryzhenkov
> I afraid it's not possible to use FxCop rule libraries. First, they > operate on compiled assembly and thus does not have to deal with > incomplete code.
I've thought of that by saving the FXCop output to a temporary file, and parsing that in the background. I think it includes source code information from the PDB file as well.
That would mean the rules would only apply if the code has been compiled at least once and remained unchanged afterwards.
> And the last - there are a lot of false positives > which requires mechanism for excluding warnings.
True, but if you use the standard FXCop project files to output the results, you can use FXCop to ignore/include rules.
But anyway, thanks for your input, there is indeed a need to write a quickfix for each FXCop rule, but most of them shouldn't be that difficult with the R# API.
Like you said, I thought it will be the most difficult adapting the FXCop API to the R# API.
The assembly attribute was only an example (though I do access the AssemblyInfo.cs a lot, version changes, permissions etc ;), I do think FXCop has loads of other useful rules, like unused internal classes/methods, spell-checking methods/variables.
Thanks for your input (and useful tool, great example for R# API as well)
Wiebe
Ilya Ryzhenkov wrote:
Hello Wiebe,
I afraid it's not possible to use FxCop rule libraries. First, they operate on compiled assembly and thus does not have to deal with incomplete code. Second, they use completely different API which would be hard yet even possible to adopt for Resharper. Third, they don't contain code for correcting problems, which is the most important thing in Resharper context. And the last - there are a lot of false positives which requires mechanism for excluding warnings.
I think we'd better wait until JetBrains setup workplace for plugins and then reimplement most important rules along with quickfixes. For example, I don't think that assembly-level attributes checks are important rules. If they even were implemented, you'd almost never see it - how often do you open AssemblyInfo.cs file? If you browse FxCop rules, you will see that most of them are not suitable for Resharper.
On exclusions: I realise, that tool like Nerpa should have some method for ignoring suggestions. I'm working on it.
Sincerely, Ilya Ryzhenkov
WT> Hi Ilya, WT> WT> I was trying to modify your plugin to enable the generic checking of WT> FxCop rules (but stranded with lack of time and documentation of WT> FxCop), do you think it would it be possible (not asking u to do it, WT> just an opinion) to adapt your plugin to enable such a feature, and WT> allow people to add their own resolving classes/methods WT> (automatically add COMVisible attribute, etc etc), for each FxCop WT> rule? WT> WT> Combined with Resharper being able to batch-resolve each possible WT> warning in a complete project, that would make a nice tool don't you WT> think? WT> WT> Wiebe WT> WT> Ilya Ryzhenkov wrote: WT>
>>> Sorry, package was wrong - it was from previous internal build. If >>> you have MassFixTest.cs file in source\Netix.Nerpa.Test\ subfolder, >>> please redownload the package. >>> >>> http://users.netix.ru/orangy/nerpa/ >>> >>> Sincerely, >>> Ilya Ryzhenkov
Sorry, package was wrong - it was from previous internal build. If you have
MassFixTest.cs file in source\Netix.Nerpa.Test\ subfolder, please redownload
the package.
http://users.netix.ru/orangy/nerpa/
Sincerely,
Ilya Ryzhenkov
Hi Ilya,
I was trying to modify your plugin to enable the generic checking of
FxCop rules (but stranded with lack of time and documentation of FxCop),
do you think it would it be possible (not asking u to do it, just an
opinion) to adapt your plugin to enable such a feature, and allow people
to add their own resolving classes/methods (automatically add COMVisible
attribute, etc etc), for each FxCop rule?
Combined with Resharper being able to batch-resolve each possible
warning in a complete project, that would make a nice tool don't you think?
Wiebe
Ilya Ryzhenkov wrote:
Hello Wiebe,
I afraid it's not possible to use FxCop rule libraries. First, they operate
on compiled assembly and thus does not have to deal with incomplete code.
Second, they use completely different API which would be hard yet even possible
to adopt for Resharper. Third, they don't contain code for correcting problems,
which is the most important thing in Resharper context. And the last - there
are a lot of false positives which requires mechanism for excluding warnings.
I think we'd better wait until JetBrains setup workplace for plugins and
then reimplement most important rules along with quickfixes. For example,
I don't think that assembly-level attributes checks are important rules.
If they even were implemented, you'd almost never see it - how often do you
open AssemblyInfo.cs file? If you browse FxCop rules, you will see that most
of them are not suitable for Resharper.
On exclusions: I realise, that tool like Nerpa should have some method for
ignoring suggestions. I'm working on it.
Sincerely,
Ilya Ryzhenkov
WT> Hi Ilya,
WT>
WT> I was trying to modify your plugin to enable the generic checking of
WT> FxCop rules (but stranded with lack of time and documentation of
WT> FxCop), do you think it would it be possible (not asking u to do it,
WT> just an opinion) to adapt your plugin to enable such a feature, and
WT> allow people to add their own resolving classes/methods
WT> (automatically add COMVisible attribute, etc etc), for each FxCop
WT> rule?
WT>
WT> Combined with Resharper being able to batch-resolve each possible
WT> warning in a complete project, that would make a nice tool don't you
WT> think?
WT>
WT> Wiebe
WT>
WT> Ilya Ryzhenkov wrote:
WT>
>> Sorry, package was wrong - it was from previous internal build. If
>> you have MassFixTest.cs file in source\Netix.Nerpa.Test\ subfolder,
>> please redownload the package.
>>
>> http://users.netix.ru/orangy/nerpa/
>>
>> Sincerely,
>> Ilya Ryzhenkov
Hi Ilya,
> I afraid it's not possible to use FxCop rule libraries. First, they
> operate on compiled assembly and thus does not have to deal with
> incomplete code.
I've thought of that by saving the FXCop output to a temporary file, and
parsing that in the background. I think it includes source code
information from the PDB file as well.
That would mean the rules would only apply if the code has been compiled
at least once and remained unchanged afterwards.
> And the last - there are a lot of false positives
> which requires mechanism for excluding warnings.
True, but if you use the standard FXCop project files to output the
results, you can use FXCop to ignore/include rules.
But anyway, thanks for your input, there is indeed a need to write a
quickfix for each FXCop rule, but most of them shouldn't be that
difficult with the R# API.
Like you said, I thought it will be the most difficult adapting the
FXCop API to the R# API.
The assembly attribute was only an example (though I do access the
AssemblyInfo.cs a lot, version changes, permissions etc ;), I do think
FXCop has loads of other useful rules, like unused internal
classes/methods, spell-checking methods/variables.
Thanks for your input (and useful tool, great example for R# API as well)
Wiebe
Ilya Ryzhenkov wrote:
>>> Sorry, package was wrong - it was from previous internal build. If
>>> you have MassFixTest.cs file in source\Netix.Nerpa.Test\ subfolder,
>>> please redownload the package.
>>>
>>> http://users.netix.ru/orangy/nerpa/
>>>
>>> Sincerely,
>>> Ilya Ryzhenkov