Created
February 10, 2014 13:26
-
-
Save danbarua/8915901 to your computer and use it in GitHub Desktop.
Albacore task to verify projects have StyleCop.MSBuild set up properly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Checks .csproj files for StyleCop.MSBuild target" | |
task :verify_stylecop_msbuild do | |
projectFiles = FileList["./**/*.csproj"] | |
projectFiles.each{|f| | |
doc = Nokogiri::XML(File.open(f)) | |
target = doc.css('PropertyGroup > StyleCopMSBuildTargetsFile') | |
if (target.empty?) | |
puts "#{f} has no stylecop.msbuild" | |
else | |
puts "#{f} is ok" | |
end | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment