Giter Site home page Giter Site logo

cake.stylecop's People

Contributors

ashthos avatar miketonguk avatar symbianx avatar wwwlicious avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cake.stylecop's Issues

Recommended changes resulting from automated audit

We performed an automated audit of your Cake addin and found that it does not follow all the best practices.

We encourage you to make the following modifications:

  • Your addin should target netstandard2.0. Please note that there is no need to multi-target, netstandard2.0 is sufficient.
  • The nuget package for your addin should use the cake-contrib icon. Specifically, your addin's .csproj should have a line like this: <PackageIconUrl>https://cdn.rawgit.com/cake-contrib/graphics/a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png</PackageIconUrl>.

Apologies if this is already being worked on, or if there are existing open issues, this issue was created based on what is currently published for this package on NuGet.org and in the project on github.

Inconsistent casing prevents this addin from being audited

The .sln file contains the fillowing reference:

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.Stylecop", "Cake.Stylecop\Cake.Stylecop.csproj", "{533D0E04-D306-4427-BA0E-29FAC90A6867}"
EndProject

(notice the lower case 'c' in Cake.Stylecop.csproj) but the csproj committed in this github repo is actually called Cake.StyleCop.csproj (with upper case 'c'). Visual Studio is not case sensitive therefore this is not a problem but if you parse the content of this file and use it to make requests to the github API (which is case-sensitive), proper casing becomes really important.

It so happens that the cake-contrib organization runs an automated process twice a day to determine if addins follow best practices, reference latest version of DLLs, etc and currently the audit tool fails to parse the project due the discrepancy in casing.

I recommend the casing be fixed in order for the project to be successfully audited.

Filter out solution folders when iterating projects

Version 0.15 of Cake introduced support for solution folders on SolutionParser. This broke Cake.StyleCop because additional items are now returned on the Projects collection and those items don't have a corresponding .csproj file on disk.

We need to filter out the "projects" that are actually solution fodlers.I see two options to handle this:

  1. Hard-code the well-known magic string for the Type of solution folders. This keeps the dependency on Cake in the same version.
  2. Assume the minimum version of Cake to 0.15.0 and filter out either using the SolutionFolder class or the SolutionFolder.TypeIdentifier constant.

Since Cake still doesn't have a way of matching addin versions to Cake versions, option 2 may break some scenarios. But everything is still on v 0.XX.X.

Which would you prefer?

c#6 features cause: SA0102: A syntax error has been discovered in file

String interpolation and null propagation usage in code results in errors reporting from StyleCop.

I pulled the source and got the same error generated when trying to build Cake.StyleCop with the Target "Code-Quality"

Stylecop: Starting analysis
Pass 1: C:/code/GitHub/Cake.StyleCop/Cake.Stylecop - /Namespaces.cs
Pass 1: C:/code/GitHub/Cake.StyleCop/Cake.Stylecop - /StylecopAlias.cs
Pass 1: C:/code/GitHub/Cake.StyleCop/Cake.Stylecop - /StyleCopHandlers.cs
Pass 1: C:/code/GitHub/Cake.StyleCop/Cake.Stylecop - /StyleCopReportSettings.cs
Pass 1: C:/code/GitHub/Cake.StyleCop/Cake.Stylecop - /StylecopRunner.cs
SA0102: A syntax error has been discovered in file C:/code/GitHub/Cake.StyleCop/Cake.Stylecop/StylecopRunner.cs on line 53. @ Line 53
Pass 1: C:/code/GitHub/Cake.StyleCop/Cake.Stylecop - /Properties/AssemblyInfo.cs
Pass 1: C:/code/GitHub/Cake.StyleCop/Cake.Stylecop - /StyleCopSettings.cs
SA0102: A syntax error has been discovered in file C:/code/GitHub/Cake.StyleCop/Cake.Stylecop/StyleCopSettings.cs on line 32. @ Line 32
Pass 1: C:/code/GitHub/Cake.StyleCop/Cake.Stylecop - /StyleCopSettingsExtensions.cs
2 violations encountered.
Stylecop: Finished analysis

Would it be possible to use the Cake Contrib Icon for your NuGet Package?

Thanks again for creating this Cake Addin, we really appreciate the effort that you have put in to creating it.

We, the Cake Team, recently announced a new Cake Contrib Icon, details of which can be found here:

http://cakebuild.net/blog/2017/06/new-cake-contrib-icon

Would you consider changing the nuspec file for your NuGet Package to use this new Cake Contrib Icon? If so, the recommended URL to use is:

https://cdn.rawgit.com/cake-contrib/graphics/a5cf0f881c390650144b2243ae551d5b9f836196/png/cake-contrib-medium.png

Details of the above URL can be found in the repository here:

https://github.com/cake-contrib/graphics

Please let me know if you have any questions.

Cake.StyleCop not referencing latest Cake.Core

Hi, thanks for creating this Addin
I'm using cake.stylecop on one of my project and it's already running for a year

Just recently I found this error when running .\build.ps1 with cake.stylecop addins included

Error: The assembly 'Cake.StyleCop, Version=0.9.0.0, Culture=neutral, PublicKeyToken=null'
is referencing an older version of Cake.Core (0.17.0).
This assembly need to reference at least Cake.Core version 0.22.0.
Another option is to downgrade Cake to an earlier version.
It's not recommended, but you can explicitly opt-out of assembly verification
by configuring the Skip Verification setting to true
(i.e. command line parameter "--settings_skipverification=true",
envrionment variable "CAKE_SETTINGS_SKIPVERIFICATION=true",
read more about configuration at https://cakebuild.net/docs/fundamentals/configuration)

Is there any chance for this Addin to update its reference to latest Cake.Core?
Thanks!

EDIT:
this was already referenced in #15
sorry I didn't see that

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.