Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to download custom combination of analyzers and refactorings #47

Closed
giggio opened this issue Nov 19, 2014 · 10 comments · May be fixed by #1036
Closed

Allow user to download custom combination of analyzers and refactorings #47

giggio opened this issue Nov 19, 2014 · 10 comments · May be fixed by #1036
Labels

Comments

@giggio
Copy link
Member

giggio commented Nov 19, 2014

This is a low priority issue, if you want to work on it please read the comments

CodeCracker is bringing together tens of different analyzers and refactorings and very soon it will gather hundreds. Not everyone will want to use all of them. This issue focuses on allowing the user to choose whatever combination of analyzers and refactorings they want and generate a custom package. A plus would be to publish that to nuget so they can use that directly on their project without the need to download, and if a combination already exists point them to an existing package.

We could build something like the Jquery UI download builder.

We don't have any idea on how to do that yet, so we need to discuss it. We could probably work with csc or msbuild directly to build an exact package combination. We would also need to work on the isolation of the analyzers and refactorings, so they can be used without depending on each others. And this all needs to be testable.

This issue is made harder by the fact that we do not yet have a build server.

Ideas are welcome and needed. This issue is first an invitation to discussion, and, after we decide on a strategy, it will become the actual implementation of the chosen strategy. So, please, brainstorm!

@sqdavid
Copy link
Contributor

sqdavid commented Nov 19, 2014

Wouldn't be simpler to include some sort of configuration file? a la ".gitignore" or "packages.config"?
In this file (that travels with the sources) the team can enable/disable analyzers. Or is needed even configure them.
We can reload configuration as the file changes, again, enabling/disabling analyzers and options. This way you don't need to create custom packs.
Later on, we can try to "standardize" the configuration as other projects can use it. So, one config file for solution that potentially works with many tools, primarily with CC.

@carloscds
Copy link
Contributor

For compilation time, is it possible create a NuGet Package that install all analyzers packages, but at Editor time (VSIX). I don't know how to to this.

@giggio
Copy link
Member Author

giggio commented Nov 19, 2014

I just remembered that we can use the code analysis infrastructure. Instead of generating a whole new assembly, we could just generate the rule set and deliver the same assembly. Or maybe they use the default rule set editor.

image

The .ruleset file is an xml that looks like this:

<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Code Cracker Rules" Description="Whatever." ToolsVersion="14.0">
  <Rules AnalyzerId="CodeCracker" RuleNamespace="CodeCracker">
    <Rule Id="CodeCracker.CatchEmptyAnalyzer" Action="None" />
    <Rule Id="CodeCracker.EmptyCatchBlockAnalyzer" Action="None" />
  </Rules>
</RuleSet>

@carloscds
Copy link
Contributor

Yes, developer can do this and configure your environment. But this work with build servers ?

@giggio
Copy link
Member Author

giggio commented Nov 19, 2014

I believe it will, if you commit the .ruleset file. I would have to check how the .csproj/.kroj/project.json uses it.

@pedroreys
Copy link

+1 on config file. You can still provide something like the JQuery UI download Builder to help out generating the config file, but I would definitely try to avoid generating different nuget packages for this as generating unique package ids would end up being ugly.

@giggio
Copy link
Member Author

giggio commented Nov 21, 2014

I just verified that the .ruleset is added to csproj:

This is what is added:

 <CodeAnalysisRuleSet>newrules.ruleset</CodeAnalysisRuleSet>

So we could maybe have a download page that prepared the nuget installation (Install-Package CodeCracker) and added the .ruleset to the project. How about that?

@carloscds
Copy link
Contributor

Cool!

@giggio
Copy link
Member Author

giggio commented Dec 1, 2014

We decided that this is not the time to work on this item, it is too early. We will leave it on the backlog and up for grabs. We have decided that the focus should be on analyzers and code fixes at the moment. If you want to work on this item just comment here and we will discuss with you an implementation.

@giggio
Copy link
Member Author

giggio commented Jun 14, 2015

@code-cracker/owners It has become really simple in Visual Studio 2015 to decide what diagnostics you want. I will close this issue because of that, if you want we can discuss it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants