Giter VIP home page Giter VIP logo

stylecopcmdline's Introduction

Welcome to my Github presense

  • ๐Ÿ’ฌ The majority of my OSS activity is related to DevOps, and most commonly developing Azure DevOps Pipeline Extensions. Feel free to reach out to me on this subject if you think I can help.
  • ๐Ÿ“ซ Reach me via the Discussions area of the appropriate GitHub repo or Twitter @richardfennell
  • ๐Ÿ˜„ Pronouns: He/Him

Recent Blog Posts

stylecopcmdline's People

Contributors

bm-fez avatar rfennell avatar thomasddn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

stylecopcmdline's Issues

Log file is not produced

The text log file is only produced if the scan fails i.e. errors as opposed to warnings are thrown. This is a different behaviour to the XML log file which is always produced (even if empty)

Make both these loggers always produce a file, even if empty if a log file name is provided

Strange error during build

Hi @rfennell

We set up StyleCopCmdLine as referred in your blog. If we run it from build vNext, we get some strange security errors. If it is run from commandline outside the build process (but on same machine) it is running as expected. Do you know what could cause this error?

Log:
2015-08-20T13:45:39.1626774Z ##[error]Exception calling "Scan" with "0" argument(s): "Inheritance security rules violated by type:
2015-08-20T13:45:39.1626774Z ##[error]'Syncfusion.Maps.MVVM.MapControlCommandBase`1'. Derived types must either match the security accessibility
2015-08-20T13:45:39.1626774Z ##[error]of the base type or be less accessible."
2015-08-20T13:45:39.1626774Z ##[error]At C:\Build\A1_work\e93f1922\S_006\Build\RunStyleCop.ps1:97 char:4
2015-08-20T13:45:39.1626774Z ##[error]+ $scanner.Scan()
2015-08-20T13:45:39.1794882Z ##[error]+ ~~~~~~~~~~~~~~~
2015-08-20T13:45:39.1794882Z ##[error] + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
2015-08-20T13:45:39.1794882Z ##[error] + FullyQualifiedErrorId : TypeLoadException

Thank you for your feedback.

Marc

Stylecop project path

Hi,
I've locally had to unload and alter the StyleCop DLL references as you are using a relative path.

Might be an idea putting those in an AppConfig or hardcoding them to default on C:\Program Files (x86)\StyleCop 4.7

Cheers

Could not load file or assembly StyleCop,

Hi;

I run your code successfully at my TFS. Everything is perfect.

I changed your code a little in my dll (Not in your wrapper dll). I uploaded to TFS. Run the task at agent. Powershell invokes dll without problem. Code's "StyleCopConsole" declaration line, it throws
"Could not load file or assembly 'StyleCop, Version=4.7.1000.0...." Exception.

We are using the same SytleCop dlls.

Have you ever got the same error? How did you solved it?

System.Management.Automation.MethodInvocationException: Exception calling "Scan" with "0" argument(s): "Could not load file or assembly 'StyleCop, Version=4.7.1000.0, Culture=neutral, PublicKeyToken=f904653c63bc2738' or one of its dependencies. The system cannot find the file specified." ---> System.IO.FileNotFoundException: Could not load file or assembly 'StyleCop, Version=4.7.1000.0, Culture=neutral, PublicKeyToken=f904653c63bc2738' or one of its dependencies. The system cannot find the file specified.
at StyleCopWrapper.Wrapper.Scan()
at CallSite.Target(Closure , CallSite , Object )
--- End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

SA1650 No errors and CustomDictionary.xml

When your "Settings.StyleCop" file only active rule is SA1650, nothing fails.
I followed these steps:
Unchecked all other rules, checked only SA1650 and save. Before run "StyleCop Runner by Black Marble" build step, double checked that it is looking right setting file. Finally run. At the end of the run it is not failing. At output window, I see : "No violations found"
But when i open the solution from Agent Folder and run stylecop it sees a lot of SA1650 warnings.

My main goal was, code is adding CustomDictionary.xml that you use. If you have CustomDictionary.xml file, you can add a lot of Acronyms. Code should ignore SA1650 warnings that word matches at CustomDictionary.xml's Acronyms part.

P.S.: At this link this they are advacing to put CustomDictionary.xml file's folder to Spelling part of "Settings.StyleCop" . But it is more flexible if we can add CustomDictionary.xml file or path at the code. This will give more flexibility.

No log files seen when using the wrapper inside a TFS vNext build

One strange behaviour is that when you test a PowerShell script outside TFS build you get a .XML and .LOG file for each project scanned. In TFS build you only see the .XML file in the drops folder, this I think is because the .LOG has been redirected into the main TFS vNext build logs.

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.