This repository was archived by the owner on Oct 4, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
main/src/core/MonoDevelop.Core/MonoDevelop.Projects Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -1607,11 +1607,17 @@ void AddRunMSBuildTargetTimerMetadata (
16071607
16081608 metadata . FirstBuild = IsFirstBuild ;
16091609
1610- bool success = false ;
1610+ bool success = true ;
16111611 bool cancelled = false ;
16121612
16131613 if ( result != null ) {
1614- success = ! result . Errors . Any ( error => ! error . IsWarning ) ;
1614+ foreach ( var error in result . Errors ) {
1615+ bool isError = ! error . IsWarning ;
1616+ if ( isError ) {
1617+ success = false ;
1618+ metadata . RegisterError ( error . Code ) ;
1619+ }
1620+ }
16151621
16161622 if ( ! success ) {
16171623 cancelled = result . Errors [ 0 ] . Message == "Build cancelled" ;
Original file line number Diff line number Diff line change @@ -1890,5 +1890,21 @@ public bool Cancelled {
18901890 get => GetProperty < bool > ( ) ;
18911891 set => SetProperty ( value ) ;
18921892 }
1893+
1894+ Dictionary < string , int > errors ;
1895+
1896+ public void RegisterError ( string errorCode )
1897+ {
1898+ if ( errorCode == null )
1899+ return ;
1900+
1901+ if ( errors == null ) {
1902+ errors = new Dictionary < string , int > ( ) ;
1903+ SetProperty ( errors , "Errors" ) ;
1904+ }
1905+
1906+ errors . TryGetValue ( errorCode , out int value ) ;
1907+ errors [ errorCode ] = value + 1 ;
1908+ }
18931909 }
18941910}
You can’t perform that action at this time.
0 commit comments