Skip to content

StyleCop Runner Task YAML

Richard Fennell edited this page Oct 25, 2018 · 2 revisions

StyleCop

The StyleCop package contains the following tasks. The table show the possible variables that can be used in YAML Azure DevOps Pipeline configurations

StyleCop

Black Marble's StyleCop test runner that use settings files in the project folders. (Using StyleCop 5.0.6419.0)

YAML snippet

# StyleCop Runner by Black Marble
# Description - Black Marble's StyleCop test runner that use settings files in the project folders. (Using StyleCop 5.0.6419.0)
- task: StyleCop
  inputs: 
     # Required arguments
     treatStyleCopViolationsErrorsAsWarnings: False
     sourcefolder: $(build.SourcesDirectory)
     maximumViolationCount: 1000
     allowableViolationCount: 0
     showOutput: False
     cacheResults: False
     forceFullAnalysis: True
     loggingfolder: $(build.StagingDirectory)
     summaryFileName: stylecopsummary.md
     detailedSummary: False

Arguments

  • Argument: treatStyleCopViolationsErrorsAsWarnings
    • Description: Treat StyleCop violations errors as warnings.
    • Type: boolean
    • Required: True
    • Default (if defined): False
  • Argument: sourcefolder
    • Description: The root folder to scan for project files.
    • Type: string
    • Required: True
    • Default (if defined): $(build.SourcesDirectory)

Advanced

  • Argument: maximumViolationCount
    • Description: Maximum project violations before analysis stops
    • Type: string
    • Required: True
    • Default (if defined): 1000
  • Argument: allowableViolationCount
    • Description: Number of violations allowed before the task fails
    • Type: string
    • Required: True
    • Default (if defined): 0
  • Argument: showOutput
    • Description: Show analysis output in log
    • Type: boolean
    • Required: True
    • Default (if defined): False
  • Argument: cacheResults
    • Description: Cache analysis results for reuse
    • Type: boolean
    • Required: True
    • Default (if defined): False
  • Argument: forceFullAnalysis
    • Description: Force complete re-analysis (ignores any cached results)
    • Type: boolean
    • Required: True
    • Default (if defined): True
  • Argument: additionalAddInPath
    • Description: Path to any custom rulesets, the directory should not be a sub directory of the current directory at runtime as this is automatically scanned
    • Type: filePath
    • Required: False
    • Default (if defined):
  • Argument: settingsFile
    • Description: Path to single settings files to use (as opposed to files in project folders)
    • Type: filePath
    • Required: False
    • Default (if defined):
  • Argument: loggingfolder
    • Description: Folder to place the detailed text and XML formated log files
    • Type: string
    • Required: True
    • Default (if defined): $(build.StagingDirectory)
  • Argument: summaryFileName
    • Description: The file to save the StyleCop analysis summary markdown file
    • Type: string
    • Required: True
    • Default (if defined): stylecopsummary.md
  • Argument: detailedSummary
    • Description: If true list all the violations, if false just the totals are shown
    • Type: boolean
    • Required: True
    • Default (if defined): False
Clone this wiki locally