Page Comparison - Custom InspectCode Issue Logger (v.5 vs v.6)

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
  • Create standard ReSharper plugin (target .NET 4.0).
  • Add additional reference to JetBrains.CommandLine.InspectCode.Unattended library from CLT distribution.
  • Implement your own logic of IInspectCodeConsumer
    Code Block
    csharp
    csharp
      public class IssueLogger : IInspectCodeConsumer
      {
        void IDisposable.Dispose() { }
    
        public void Consume(IIssue issue)
        {
          Console.WriteLine("{0}({1}) {2}", issue.File, issue.Range, issue.Message);
        }
      }
    
  • Implement IInspectCodeConsumerFactory factory
    Code Block
    csharp
    csharp
      [SolutionComponent]
      public class IssueLoggerFactory : IInspectCodeConsumerFactory
      {
        public IInspectCodeConsumer CreateConsumer(IEnumerable<IProjectModelElement> inspectScope, FileSystemPath outputFile = null)
        {
          return new IssueLogger();
        }
      }
    
  • Start InspectCode with following parameters
    inspectcode ... /Plugin=path-to-custom-logger-dll