ashthos / cake.stylecop Goto Github PK
View Code? Open in Web Editor NEWStylecop implementation for the CakeBuild build system.
License: MIT License
Stylecop implementation for the CakeBuild build system.
License: MIT License
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:
.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.
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.
In order to have the above show up as a code snippet on the site, can you add a <code>
element here:
https://github.com/Ashthos/Cake.StyleCop/blob/master/Cake.Stylecop/StyleCopAlias.cs#L44
Have a look here for an example:
https://github.com/cake-contrib/Cake.Gem/blob/develop/Source/Cake.Gem/GemAliases.cs#L29
Please let me know if you have any questions.
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:
Type
of solution folders. This keeps the dependency on Cake in the same version.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?
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
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:
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.
Works OK for absolute paths, however even in this case, the resources are copied to the same directory and not a resources/ subdir, meaning they are not found.
i.e. get your addin listed here:
Have a look at this PR:
This assumes that you have added XML Documentation to your addin, as described here:
http://cakebuild.net/docs/contributing/documentation
Let me know if you have any questions. Thanks!
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.