1. 07 5月, 2017 1 次提交
  2. 15 3月, 2017 1 次提交
  3. 23 11月, 2016 1 次提交
  4. 11 2月, 2016 2 次提交
  5. 24 12月, 2015 1 次提交
    • M
      Improve analyzer performance for CompilationWithAnalyzers (IDE host): · da03de0e
      Manish Vasani 提交于
      1. Add support for a simulated event queue to generate compilation events by computing declarations in the tree. Invoking GetDiagnostics to populate the event queue is one of the main reason for large allocations/VM in our perf tests. We can get back to using the compilation event queue when the compiler supports attaching an event queue to an existing compilation, without requiring a complete clone.
      
      2. Move the cached compilation data (declarations, suppression state, etc.) out of a conditional weak table and strongly reference it in CompilationWithAnalyzers.
      
      3. Reduce allocations in per-analyzer state maintenance by tracking analyzed declarations instead of pending declarations - latter can be very large for symbols with many declarations (e.g. global namespace).
      da03de0e
  6. 16 10月, 2015 1 次提交
  7. 10 10月, 2015 1 次提交
  8. 24 9月, 2015 1 次提交
  9. 15 9月, 2015 1 次提交
  10. 11 9月, 2015 1 次提交
    • M
      Initial work for "Disconnected baselining" scenario: · 08b9efdc
      Manish Vasani 提交于
      1. CompilationWithAnalyzers can now report analyzer diagnostics with source suppressions (pragma/SuppressMessageAttribute). This will eventually allow us to surface diagnostics with source suppressions in the error list. Note that the behavior of command line compilers and all the GetDiagnostics APIs is unchanged, only the compiler analyzer will report diagnostics with source suppressions.
      
      2. Add FixAll support for Suppression code fixes. Light bulb suppression fixes now show the "Fix all occurrences" options for Document/Project/Solution. This change adds the basic functionality to bulk suppress diagnostics. This will eventually be consumed for baselining all/selected diagnostics from error list/solution explorer.
      
      3. Simplify the Suppression light bulb menu to remove the option to add a local SuppressMessageAttribute. The only options now are to suppress in source (pragma) or suppressions file (assembly level SuppressMessageAttribute).
      08b9efdc
  11. 10 6月, 2015 1 次提交
  12. 13 3月, 2015 1 次提交
  13. 21 2月, 2015 1 次提交
  14. 18 2月, 2015 1 次提交
  15. 17 2月, 2015 1 次提交
  16. 14 2月, 2015 1 次提交
    • H
      add property bag to diagnostic and remember origin of the diagnostic · 93323086
      Heejae Chang 提交于
      this change contains 2 changes. one is adding property bag to diagnostic and the other is putting origin of the diagnostic in the property bag.
      
      the property bag is added based on users feedback. this basically lets users add a diagnostic specific information.
      
      second change is for error list. we would like to order errors better based on the origin of the errors (syntax, declaration, others and etc). two changes are together because the second one takes advantage of the property bag we just added.
      
      ...
      
      this is a port of CR I had in TFS to github. checkin is delayed due to sign off - this contains public API change.
      93323086
  17. 25 1月, 2015 1 次提交
    • J
      Change the file encoding of many files back to UTF-8. · cfdd6068
      jaredpar 提交于
      These were accidentally changed to UTF-16LE during a recent scripted change.  This went unnoticed because the encoding change didn't register in CodeFlow (indeed if you view a shelve of this change in CodeFlow it will report no changes).  UTF-16 does not work well with Git as it is often interpreted as a binary file.  Moving back to UTF-8 so our GitHub experience works well for customers.
      
      closes #66 (changeset 1403787)
      cfdd6068
  18. 24 1月, 2015 1 次提交
    • B
      First step in moving the compiler code base to the .Net Foundation coding style. · 16512b64
      beep boop 提交于
      Background:
      
      As discussed in the dev team all hands all code under the GitHub dotnet foundation is using a single process for contribution, API review, infrastructure and coding style. The idea is to present a unified view to our customer and give them a single story for contributing to any project under the dotnet foundation.
      
      https://github.com/dotnet/corefx/wiki/Contributing#c-coding-style
      
      The coding style transition is automated using a Roslyn based rewrite tool:
      
      https://github.com/dotnet/codeformatter
      
      This will be applied in stages across our developer tree. Right now the focus is on the Open directory as this is what is being presented on github. Code owners will be contacted before the transition happens.
      
      Note: this is a soft style requirement. There are no build errors that come from this change.
       (changeset 1403394)
      16512b64
  19. 15 1月, 2015 1 次提交
  20. 14 1月, 2015 1 次提交
  21. 09 1月, 2015 1 次提交
  22. 07 1月, 2015 1 次提交
    • T
      Suppress some spurious diagnostics. · 31aff41d
      tmeschter 提交于
      Within the compiler layer, we want to access properties like Category, DefaultSeverity, IsEnabledByDefault, etc., off of Diagnostic directly rather than going through Diagnostic.Descriptor. Roslyn diagnostic RS0013 enforces this.
      
      However, it fires within Diagnostic itself, even though this is the one place where accessing Descriptor is legitimate. This change adds suppressions to these occurrences, but the diagnostic should be updated to not fire in Diagnostic itself. A bug has been filed to track that work, and updating the Roslyn solutions to use new toolset & diagnostics packages with the fix.
       (changeset 1388110)
      31aff41d
  23. 04 12月, 2014 1 次提交
    • M
      Add compiler diagnostic analyzers for VB and C# compilers. · 68e37500
      manishv 提交于
      1) Implement diagnostic analyzers which register syntax tree action (syntax diagnostics), semantic model action (semantic diagnostics) and compilation end action (declaration diagnostics with non-source location)
      
      2) Add C# and VB code analysis assemblies as analyzer assets to VisualStudioComponents VSIX manifest file.
      
      3) Remove special casing of CompilerDiagnosticsProvider in the IDE diagnostic service, its just a regular VSIX based analyzer now.
      
      4) Add WellKnownDiagnosticTags.NotConfigurable tag to all compiler errors and ensure that we don't suppress/filter diagnostics or analyzers with this tag. (changeset 1377682)
      68e37500
  24. 21 11月, 2014 1 次提交
    • M
      Add DiagnosticDescriptor support for compiler diagnostics. · b59eb889
      manishv 提交于
      Compiler diagnostics (DiagnosticWithInfo type) currently return null for Diagnostic.Descriptor property, as the descriptor is not required for creating these diagnostics. However, to make our compilers first class analyzers with supported descriptors, we need the descriptors, this change adds this support.
      Given that the descriptor has lot of fields which are unncessary in command line compilation, descriptor is lazyily created on demand, and should never be created during command line compilation. Later this week, I will create a Roslyn diagnostic to ensure that Diagnostic.Descriptor property isn't directly accessed in the compiler layer. (changeset 1375459)
      b59eb889
  25. 14 11月, 2014 1 次提交
    • M
      Allow localizing DiagnosticDescriptor. · 1f668d25
      manishv 提交于
      Primary intent here is to try and avoid breaking changes, while also keeping the usage for Diagnostic authors as simple as possible. On these lines, the primary changes here are:
      
      1) Add an abstract LocalizableString type to represent strings that could be possibly localized. Provide an implementation of this type for resource strings from ResourceManager: LocalizableResourceString.
      
      2) Change type of DiagnosticDescriptor's properties for Title, Description and MessageFormat to LocalizableString and change Diagnostic to implement IFormattable.
      
      3) Expose DiagnosticDescriptor from Diagnostic: Change SimpleDiagnostic (used for all publically created diagnostics, except compiler diagnostics) to store the DiagnosticDescriptor instead of it's individual fields such as id, description, etc. In a subsequent change, we will move the compiler diagnostics also to be descriptor based.
      
      See the change to CA1001 and CA1708 DiagnsoticAnalyzers in this change to see how the client can pass in the localizable strings. (changeset 1371578)
      1f668d25
  26. 29 10月, 2014 1 次提交
    • M
      Fix for bug 1068099: Warning level for info/hidden diagnostics should be non-zero · db859fcc
      manishv 提交于
      Ensure that warning level for non-error diagnostics is non-zero. This is required for backward compat, as the only way to suppress warnings in C# used to be /warn:0.  If user has command line with /warn:0, they should continue to only see errors in their output. Prior to this change, we also show info messages in the output. (changeset 1362306)
      db859fcc
  27. 07 10月, 2014 1 次提交
    • M
      Fix for bug 1038056: Rationalize Diagnostic.Severity and Diagnostic.IsWarnAsError properties · a66bd965
      manishv 提交于
      Diagnostic.Severity property used to denote different things for compiler and user diagnostics. For compiler diagnostics, this property denotes the error code severity, i.e. the default severity of the diagnostic. For warnings as errors, this property still returned DiagnosticSeverity.Warning and the consumer had to check for the IsWarnAsError property to get the effective severity. For user diagnostics, this property denotes the effective severity based on the compilation options.
      
      This change makes the following changes:
      1) Change Diagnostic.Severity to always represent the effective severity of the diagnostic for both user and compiler diagnostics. So for warn as error, this will return error severity.
      2) Introduce Diagnostic.DefaultSeverity to represent the default severity of the diagnostic. This is the error code severity for compiler diagnostics and diagnostic descriptor severity for user diagnostics.
      3) Change IsWarningAsError property to return true iff Diagnostic.DefaultSeverity = Warning and Diagnostic.Severity = Error. (changeset 1348667)
      a66bd965
  28. 02 10月, 2014 1 次提交
    • J
      This change implements a new DiagnosticAnalyzer for equality which adds the... · 69d8e2ed
      jaredpar 提交于
      This change implements a new DiagnosticAnalyzer for equality which adds the following rules (VB and C#)
      
      1. If a struct overrides Object.Equals it should implement IEquatable<T>. This avoids boxing and extra type checks in many scenarios
      2. If a struct or class implements IEquatable<T> it should override Object.Equals. Without this the equality implementation is simply incomplete and will unexpectedly fail when Object.Equals
      
      There were a number of violations in the Roslyn source tree of these rules which I cleaned up as a part of this change. A couple of notes on that work
      
      - In several places Equals and GetHashCode were overridden simply to throw an exception. Rather than implement IEquatable<T> (and pay the cost of the interface JIT) I just suppressed the analysis
      - Hash utility class cannot be used from RoslynTaoActions because it comes from 2 different referenced DLLs. For now I just manually implemented hashshing, can use extern aliases to solve if there is a strong desire for this
      
       (changeset 1345744)
      69d8e2ed
  29. 10 9月, 2014 1 次提交
    • S
      Add description and helplink fields to diagnostics that can be viewed when the... · 988d95a0
      shyamn 提交于
      Add description and helplink fields to diagnostics that can be viewed when the code fix preview header is expanded. Also display this information in the solution explorer property pane when a specific diagnostic is selected under the 'Analyzers' node.
      
      Compiler diagnostics don't supply any description or helplink currently - but custom diagnostics can. (changeset 1322473)
      988d95a0
  30. 20 6月, 2014 1 次提交
    • T
      Splits Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.CSharp and... · fc3b332f
      TomasMatousek 提交于
      Splits Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.CSharp and Microsoft.CodeAnalysis.VisualBasic into portable and desktop assemblies.
      
      Existing Core\Source, CSharp\Source and VisualBasic\Source directories are renamed to Core\Portable, CSharp\Portable and VisualBasic\Portable.
      New sibling Desktop folders are added and non-portable source is moved there.
      "System.Runtime" references has to be removed in order for the portable project system magic to automatically add facade references.
       (changeset 1281686)
      fc3b332f
  31. 07 5月, 2014 1 次提交
  32. 23 4月, 2014 1 次提交
    • S
      Adding ability for diagnostic authors to turn off rules by default. · 43a885da
      srivatsn 提交于
      Diagnostic Analyzers should be able to say that out of the rules that are produced by them, some are enabled\disabled by default (if no user options are passed in).
      
           - Adding a property to DiagnosticDescriptor that can be set by analyzers. The expression of this property needs to propagate through Diagnostic and DiagnosticData.
           - Making the compiler and analyzerdriver not even run an analyzer which is completely disabled and for the partially disabled ones, suppress the disabled rules.
           - Cnge all existing analyzers to set this to true. For the FxCop ones, based on audit of usefulness, we should turn off a whole bunch of them by default in the future.
       (changeset 1236992)
      43a885da
  33. 22 4月, 2014 1 次提交
    • S
      DiagnosticSeverity.None is something that's not used by the compilers at all.... · f7637cec
      srivatsn 提交于
      DiagnosticSeverity.None is something that's not used by the compilers at all. Some IDE analyzers produce None diagnostics. The IDE uses it to mean diagnostics that are hidden (and are used for other purposes like offering fixes or graying out text). None means it is disabled. Calling this hidden so as to avoid that confusion.
      
      Also updating the ruleset parser to understand Info and Hidden.
       (changeset 1236447)
      f7637cec
  34. 16 4月, 2014 1 次提交
    • M
      This change adds a public API to AnalyzerDriver to get effective diagnostics... · b3a30503
      manishv 提交于
      This change adds a public API to AnalyzerDriver to get effective diagnostics after applying the ruleset options. Additionally, it also fixes the Compilation.FilterDiagnostic methods (VB and C# compiler) to handle diagnostics and ruleset file settings with severity None/Info. (changeset 1231399)
      b3a30503
  35. 26 3月, 2014 1 次提交
  36. 23 3月, 2014 1 次提交
    • M
      Port changeset 1211580 to build preview branch. · 081a638e
      manishv 提交于
      DiagnosticDescriptor API changes and documentation comments: Change the DiagnosticDescriptor API as per the Diagnostics API review feedback. It now has following field with corresponding doc comments:
      
              /// <summary>
              /// Create a DiagnosticDescriptor, which provides description about a <see cref="Diagnostic"/>.
              /// </summary>
              /// <param name="id">A unique identifier for the diagnostic. For example, code analysis diagnostic ID "CA1001".</param>
              /// <param name="description">A short localizable description of the diagnostic. For example, for CA1001: "Types that own disposable fields should be disposable".</param>
              /// <param name="messageFormat">A localizable format message string, which can be passed as the first argument to <see cref="M:System.String.Format"/> when creating the diagnostic message with this descriptor.
              /// For example, for CA1001: "Implement IDisposable on '{0}' because it creates members of the following IDisposable types: '{1}'."</param>
              /// <param name="category">The category of the diagnostic (like Design, Naming etc.). For example, for CA1001: "Microsoft.Design".</param>
              /// <param name="defaultSeverity">Default severity of the diagnostic.</param>
              public DiagnosticDescriptor(string id, string description, string messageFormat, string category, DiagnosticSeverity defaultSeverity) (changeset 1211598)
      081a638e
  37. 22 3月, 2014 1 次提交
    • M
      DiagnosticDescriptor API changes and documentation comments: Change the... · 1b5b107c
      manishv 提交于
      DiagnosticDescriptor API changes and documentation comments: Change the DiagnosticDescriptor API as per the Diagnostics API review feedback. It now has following field with corresponding doc comments:
      
              /// <summary>
              /// Create a DiagnosticDescriptor, which provides description about a <see cref="Diagnostic"/>.
              /// </summary>
              /// <param name="id">A unique identifier for the diagnostic. For example, code analysis diagnostic ID "CA1001".</param>
              /// <param name="description">A short localizable description of the diagnostic. For example, for CA1001: "Types that own disposable fields should be disposable".</param>
              /// <param name="messageFormat">A localizable format message string, which can be passed as the first argument to <see cref="M:System.String.Format"/> when creating the diagnostic message with this descriptor.
              /// For example, for CA1001: "Implement IDisposable on '{0}' because it creates members of the following IDisposable types: '{1}'."</param>
              /// <param name="category">The category of the diagnostic (like Design, Naming etc.). For example, for CA1001: "Microsoft.Design".</param>
              /// <param name="defaultSeverity">Default severity of the diagnostic.</param>
              public DiagnosticDescriptor(string id, string description, string messageFormat, string category, DiagnosticSeverity defaultSeverity) (changeset 1211580)
      1b5b107c
  38. 19 3月, 2014 1 次提交