Commit Graph
545 Commits
Author SHA1 Message Date
Stephen Toub 7bdae2162f Contribute to StyleCop SA1002 (semicolon spacing)
However, I'm not enabling the rule permanently, as it disagrees with VS IDE0055 about the spacing around semicolons at the end of empty while and for loops.

Because this also impacts `for (;;)` loops, I also searched and replaced those with `while (true)`, to standardize on that across the codebase.


Commit migrated from https://github.com/dotnet/corefx/commit/93285e4511a9656a30b92b8b6a9088608aac40e0
2019-08-24 07:47:35 -04:00
Stephen Toub bfa8c26dcb Fix StyleCop warning SA1001 (spaces around commas)
Commit migrated from https://github.com/dotnet/corefx/commit/37f351d310f07560274c63862ceaed8afd54a46f
2019-08-24 07:47:35 -04:00
Stephen Toub 9548bea38a Make many fields readonly or const across corefx (dotnet/corefx#40298)
* Make many fields readonly or const

* Address PR feedback

- Updated asn.xslt
- Regenerated .xml.cs files


Commit migrated from https://github.com/dotnet/corefx/commit/0cc22ccba707d7552159363d586262fa9c4e8a2a
2019-08-14 14:19:30 -04:00
Stephen Toub 182e23d123 Re-enable StyleCop warning SA1400 (elements should specify access) (dotnet/corefx#40240)
One of the more common things we "nit" in PRs.  Now the compiler will flag it for us.

Commit migrated from https://github.com/dotnet/corefx/commit/61a6264018989e06d314b68d57bd91b4b72e4360
2019-08-12 14:29:19 +02:00
Stephen Toub 60d1224ddd Re-enable StyleCop warnings SA1028 and SA1518 (trailing whitespace and blank lines) (dotnet/corefx#40113)
Mechanical/automated change.  The only manual changes were a) removing the two rules from the CodeAnalysis.ruleset file, b) removing spaces from one line of a .targets file that is used to generate a .cs file, and c) reverting the changes in a few test files where the naive replacement happened in the middle of a verbatim string where the whitespace actually mattered.

Commit migrated from https://github.com/dotnet/corefx/commit/09a6e66b0c2b31bd0f6e7e3170537d14027aeed0
2019-08-07 21:07:58 -04:00
Stephen Toub 0d8a87d1dd Enable stylecop warnings 1205, 1212, and 1617 (dotnet/corefx#39941)
* Enable stylecop warning 1617 (void return value should not be documented)

* Enable stylecop warning 1212 (get/set accessor ordering)

* Enable stylecop warning 1205 (modifier ordering)


Commit migrated from https://github.com/dotnet/corefx/commit/6074cfc995d7968fcdbc7f707acff0c6284c6ae9
2019-08-01 18:00:12 -04:00
Stephen Toub 6e335aa872 Enable several StyleCopAnalyzers (dotnet/corefx#39921)
* Fix ordering of keywords in member signatures

* Add StyeCop.Analyzers

Most rules are disabled.  Many of them we'll want to leave disabled, however there are a handful it'll be good to enable over time.

* Use built-in type alias

* Fix straggling stylecop warnings in all configurations

* Replace tabs with spaces


Commit migrated from https://github.com/dotnet/corefx/commit/a12c557a72988070b8624cc7ecc46899629895c4
2019-07-31 19:10:59 -04:00
Ganbarukamo41 9be9c570be Enable analyzer for xUnit2000 (Constants and literals should be the expected argument) (dotnet/corefx#39842)
* Enable xUnit2000 analyzer

This commit enables xUnit2000 (Constants and literals should be the expected argument) and apply fixes for the existing violating codes.
* a Massive commit fixing xUnit2000
* fixing some 2003 errors

* Fix mistakes

* Fix missed errors for unix


Commit migrated from https://github.com/dotnet/corefx/commit/93d7aa1c1737b6da29d04b78557215e18eb786d4
2019-07-28 15:47:52 -07:00
Stephen Toub aa11d6cbbf Re-enable CA1200 (avoid cref tag prefixes) (dotnet/corefx#39773)
* Re-enable CA1200 (avoid cref tag prefixes)

Specifying the prefix prevents the compiler from validating what comes after it.

* Fix netfx build


Commit migrated from https://github.com/dotnet/corefx/commit/58a4d24eb808936f7dc61e68265e968291470b42
2019-07-25 22:04:39 -04:00
Stephen Toub d4233d8560 Re-enable CA1825 (zero-length array allocations) (dotnet/corefx#39708)
Commit migrated from https://github.com/dotnet/corefx/commit/d0fc0a2b193d11645acc0fe72bbf1b97678a5161
2019-07-24 10:42:39 -04:00
Stephen Toub cd3ca6f991 Re-enable xunit warning 2004 (dotnet/corefx#39698)
* Replace "Assert.Equal(true, " with "Assert.True("

* Replace "Assert.Equal(false, " with "Assert.False("

And fix a few Assert.Equal(true cases that deal with objects and thus need to be reverted.

* Replace "Assert.StrictEqual(true, " with "Assert.True("

* Revert a few changes where true/false was being compared to object

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/1296bc8386a7283e319ddf723282f16651f9ea5f
2019-07-23 17:05:15 -04:00
William Godbe d285b6c662 Update branding in master to 5.0 (dotnet/corefx#39503)
* Update branding in master to 5.0

* Revert to old AssemblyVersions

* Update to correct package versions

* Update Prerelease to alpha1

* Remove redundant PackageVersions

* Disable index check

* Update packageIndex

* Update PackageIndex again

* Revert incorrect packageIndex versions


Commit migrated from https://github.com/dotnet/corefx/commit/1acaa2017cfc64ef1aabcf3b19d0e097af692616
2019-07-16 15:47:57 -07:00
Viktor Hofer 2862b45d28 Update sln configurations (dotnet/corefx#38698)
Commit migrated from https://github.com/dotnet/corefx/commit/5ec88f81af71d253cfa74f9982abf748ccbd529b
2019-06-19 23:28:19 +02:00
Viktor Hofer a5d5b91672 Delete dead uapaot code (dotnet/corefx#38330)
* Delete dead uapaot code

Commit migrated from https://github.com/dotnet/corefx/commit/8c2be7893fa585cba9c094c27b69d7c8e0822ef3
2019-06-14 15:12:42 +02:00
Viktor Hofer b661c58b1c Replace netstandard test projects with tfms
Netstandard test projects are broken by design and don't support the
Microsoft.Net.Test.SDK. Replacing the netstandard tfm with the concrete
implementation tfms.


Commit migrated from https://github.com/dotnet/corefx/commit/d29c16c99c6045ee67444a7a693dd4476861c463
2019-05-30 16:18:41 +02:00
Jose Perez Rodriguez 7d8177c8c3 Fix VS Configurations for all projects in corefx (dotnet/corefx#37477)
Commit migrated from https://github.com/dotnet/corefx/commit/1c48331eb5784c58b81309665257f454abd7d322
2019-05-06 14:46:10 -07:00
Tanner Gooding 5a5ed7652a Regenerating reference sources in order to reorder enum fields (dotnet/corefx#37045)
Commit migrated from https://github.com/dotnet/corefx/commit/17382def0f680653870c31af1acf086ac41dcc0b
2019-04-23 13:40:45 -07:00
Viktor 7e4b5f9b01 Update src folder
Commit migrated from https://github.com/dotnet/corefx/commit/817c36a05ef2d92e59ce6f5a37e2be50076361b3
2019-04-02 19:21:57 +02:00
Stephen Toub e7e11b10e1 Remove remaining usage of Contract.* (dotnet/corefx#36002)
Only remaining use of System.Diagnostics.Contracts in corefx is tests for the library itself, and usage of the [Pure] attribute.

Commit migrated from https://github.com/dotnet/corefx/commit/940ecee40b64ab93c92f87a7e8909771c013f1a5
2019-03-14 09:47:04 -04:00
Viktor Hofer f8a8530d0f Project msbuild syntax cleanup (dotnet/corefx#35686)
* Remove license header from non-shipping files

* Remove obsolete Project attributes

* Remove xml header and remove DefaultTargets


Commit migrated from https://github.com/dotnet/corefx/commit/c390ce7df50252e11f5d322276e9d19e046d1332
2019-03-03 18:55:25 +01:00
Ahson Khan 4fed6ab881 Auto-generate the reference assemblies and separate type forwards (dotnet/corefx#35557)
* Auto-generate the reference assemblies

* Add back type forwards.

* Revert "Add back type forwards."

This reverts commit dotnet/corefx@3acf74aabb.

* Add back TypeForwardedTo in .Forward.cs files

* Add new type forward files to the csproj files

* Add back if-defs and move TestUtilities comment from ref to source

* Remove duplicate definitions, delete unnecessary manual files,

* Fix build breaks

* Add back missing AsyncMethodBuilderAttr to S.Runtime ref

* Fix typo between XmlDocument and XPath.XDocument

* Add type forward fild missed from previous commit

* Fix ECDiffieHellmanCngPublicKey internal ctor for netfx 4.6.1

* Remove "this type was moved to comments" from the type forwards.

* Add back the Xml and Debugger* attributes to Xml.ReaderWriter

* Add back struct layout attributes

* Add back attributes missing (highlighted from api compat)

* Add missing toolbox item attribute in s.data.common.

* Add missing struct layout attributes and remove unnecessary additions

* Add back InterfaceTypeAttribute


Commit migrated from https://github.com/dotnet/corefx/commit/16689aa0a933517dc45465fc6edb6223222414a6
2019-02-27 19:39:21 -08:00
Stephen Toub 860ccad799 Remove stale warning 420 pragmas (dotnet/corefx#35023)
It used to be that the CS0420 warning ("a reference to a volatile field will not be treated as volatile") would fire when a volatile was used with an Interlocked.* operation.  That warning was unnecessary, as Interlocked.* would itself provide the relevant barriers, and these functions were special cased in Roslyn a long time ago.  But there are still lots of places where pragmas disabling the warning have stuck around.  I'm deleting them.

Commit migrated from https://github.com/dotnet/corefx/commit/8b3446f4e8ad1a7b19c7298e20396629c6e0092e
2019-02-01 14:57:35 -05:00
AraHaan f108845249 Turn on xml documentation validation globally. (dotnet/corefx#32934)
* Turn on xml documentation validation globally.

* Ignore warning 1591 globally.

* Fixed build failures.

* Move the Original DocumentationFile Condition to the Group.

Now NoWarn has no Condition on it.

* Fixed NoWarn overwrite.

* Update Directory.Build.props

* Update System.Runtime.CompilerServices.Unsafe.ilproj

* Update file on github web.

Sadly it seems I can only do this on my phone now. RIP

* Update System.Security.Cryptography.Csp.csproj

* Update Directory.Build.props

* Suppress some warnings.

* Fixed remaining compile errors.

* Update System.Diagnostics.StackTrace.csproj

* Update System.Security.Cryptography.Xml.csproj

* Fixed xml documentation typo in Microsoft.VisualBasic.

* Fixed missing suppressions.

* Suppress more errors.

* Suppress more errors.

* Suppress more errors.

* Suppress even more errors.

* Suppress more errors.

* Update Directory.Build.props

* Suppress more errors.

Also fix a documentation issue specific to OSX.

* Suppress more errors.

* Suppress more errors.

* Disable xml documentation for System.Diagnostics.Process.

* Do not overwrite NoWarn.

* Enable docs for S.D.P


Commit migrated from https://github.com/dotnet/corefx/commit/6abb4cd0bafa2a3c7486fb23bcc611bd211d0f8e
2018-12-08 22:21:50 -08:00
Wes Haggard 954fb511b3 Rename AssemblyKey properties to StrongNameKeyId as part of arcade work
Commit migrated from https://github.com/dotnet/corefx/commit/7edd861bf2dd59ecdb4284e0fd291d7458198a9d
2018-10-30 15:14:01 -07:00
Stephen Toub d55f353845 Fix TransformManyBlock's EnsureOrdered=false to not hold lock while iterating (dotnet/corefx#31059)
When EnsureOrdered is set to false (the default is true) and the max degree of parallelism isn't 1 (meaning it allows for parallelism), TransformManyBlock doesn't employ a reordering buffer but needs to then ensure that the collection it writes the results of the transform to is accessed in a thread-safe manner, so it takes a lock.  Currently it takes the lock around the whole enumeration of the result.  While that avoids lots of locking/unlocking for cases where the enumerable produces all of its results very quickly, it causes problems when the enumerable may be slow to produce results, as it then ends up serializing the processing of all of the enumerables.  The fix is simply to take the lock if it's needed only while adding to the target collection, not while iterating the enumerable.

This change does have a small breaking change potential, in that it's possible someone could have set parallelism to > 1 and set EnsureOrdered to false, and then relied on the lock that was being taken exactly for its serialization, in order to make their delegate effectively thread-safe.  But a) EnsureOrdered is a relatively new feature and this setting isn't the default, b) if you've set parallelism to something other than 1, by design you're asking for your delegate to run concurrently with itself.  So the chances of actually breaking something with this bug fix are minimal.

Commit migrated from https://github.com/dotnet/corefx/commit/b64500068a978f0fd96f1dfc8abf1e021b2b83b1
2018-07-13 20:19:41 -04:00
Stephen Toub 83b8fdacb2 Remove stale comment
Commit migrated from https://github.com/dotnet/corefx/commit/384fa4ad8ed793974218d767aa9e781fb4e99e7c
2018-07-13 09:17:06 -04:00
Eric Erhardt 779486884e Merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/ec546de620c5248f3662d6aaca989ed382b86b6b
2018-06-28 21:28:41 -05:00
Eric Erhardt 8b6d5baf20 Change .csproj to new Configurations property
Change .sln to use the managed C# project system GUID.


Commit migrated from https://github.com/dotnet/corefx/commit/e05508a62d28f4807f85abe9cb7adf8382f792b4
2018-06-28 17:49:22 -05:00
Stephen Toub 4c9eb2ec25 Simplify built-in types across corefx tests (dotnet/corefx#30660)
Commit migrated from https://github.com/dotnet/corefx/commit/7ae1a252d7e68c5513d2658de7a401c37e9b0504
2018-06-25 22:42:04 -07:00
Stephen Toub 2fb9f847fc Simplify built-in types across corefx (dotnet/corefx#30656)
Commit migrated from https://github.com/dotnet/corefx/commit/e0ba7aa8026280ee3571179cc06431baf1dfaaac
2018-06-25 16:54:41 -07:00
Eric Erhardt 1df03e5bbd Rename dir files to Directory.Build
dir.props => Directory.Build.props
dir.targets => Directory.Build.targets


Commit migrated from https://github.com/dotnet/corefx/commit/204a8dbbc23bfc51d419c93f2f2ddaf50db8020f
2018-06-15 17:07:48 -05:00
Eric Erhardt 70091b9c8b Merge master into SdkProj
Commit migrated from https://github.com/dotnet/corefx/commit/ad505eb98c6a887db2d2932fec256d9e4e394169
2018-06-11 17:20:10 -05:00
Stephen Toub afe40b4235 Fix dataflow tests to use Assert.Throw instead of Assert.ThrowsAsync
Commit migrated from https://github.com/dotnet/corefx/commit/48bc000682a7cf2d8578c9b9853f50ee5b7c92d5
2018-06-05 09:42:54 -04:00
Maryam Ariyan aa841d48e0 Modify corefx to use ConcurrentQueue from shared
Commit migrated from https://github.com/dotnet/corefx/commit/13e9d66f6051db2f6be532803ef3ab66807fd992
2018-05-22 09:19:22 -04:00
wtgodbe f38ceb30be Convert all .csproj files in src to SDK-style projects
Commit migrated from https://github.com/dotnet/corefx/commit/91d7e62bbf28094a2b419b87847bcd6a7658564d
2018-05-21 11:53:46 -07:00
Wes Haggard 90e6643a41 Bump minor versions of all packages produced
Commit migrated from https://github.com/dotnet/corefx/commit/63f6be575c97f3d7ca6406c5de732105892e146a
2018-04-27 14:56:19 -07:00
Wes Haggard fc526e8605 Bump assembly versions for libraries with packages
Commit migrated from https://github.com/dotnet/corefx/commit/6a1b5c0aeee747a535579da7374c05b8d878fb65
2018-04-27 14:56:18 -07:00
Eric St. John 550b05e6df Revert "Add an empty dependency group for net45 to DataFlow package"
This reverts commit dotnet/corefx@eb2025d6d3.


Commit migrated from https://github.com/dotnet/corefx/commit/4959283792c474422101ab396cac7abc099609f2
2018-03-08 10:37:15 -08:00
Brian Robbins fb63ccf9cd Use the default supported nuget versions. (dotnet/corefx#27622)
Commit migrated from https://github.com/dotnet/corefx/commit/ac65c0f3fc79303e92da38a40bec52555afe2ff7
2018-03-03 20:55:44 -08:00
Wes Haggard fc9b090ef0 Update references assemblies to include private fields for structs
Contributes to https://github.com/dotnet/corefx/issues/6185.


Commit migrated from https://github.com/dotnet/corefx/commit/2e97d43060dfb589907a15dbfef0cc7db6e90546
2018-01-12 08:53:41 -08:00
Wes Haggard 4602205d46 Merge pull request dotnet/corefx#26161 from weshaggard/AddEmptyDependencyGroupToDataFlow
Add an empty dependency group for net45 to DataFlow package

Commit migrated from https://github.com/dotnet/corefx/commit/6603176d3f62864d71ef87171a8c9083542e5d1e
2018-01-04 21:42:12 -08:00
Wes Haggard ab721f21cb Add an empty dependency group for net45 to DataFlow package
DataFlow has assets that are netstandard and old PCL and corrisponding
dependencies. However when selecting for .NET Framework we can eliminate
the dependencies as they aren't necessary as we know they all exist already
in framework.

Fixes https://github.com/dotnet/corefx/issues/25171


Commit migrated from https://github.com/dotnet/corefx/commit/eb2025d6d36ac7de4b1f0c9a047383e2253758c1
2018-01-04 13:34:47 -08:00
Marco Rossignoli 6371b7d5f0 "Don't directly throw Exception" System.Threading.Tasks.Dataflow (dotnet/corefx#26052)
* Don't directly throw Exception

* Don't directly throw Exception

* fix exception message


Commit migrated from https://github.com/dotnet/corefx/commit/a50e9744b0b06e6dfe3eb31d6da6208d5cc8734c
2018-01-04 10:58:47 -08:00
Stephen Toub 09612a41dd Update ref assemblies with readonly changes
Commit migrated from https://github.com/dotnet/corefx/commit/45b724f6b6391910edea8a70f3f22a4a7996696d
2017-11-03 09:48:47 -04:00
Stephen Toub 54c1d578d8 Mark applicable structs as readonly
Commit migrated from https://github.com/dotnet/corefx/commit/54e889a7c71bf22f9f1ef244a9d040fee64c74d5
2017-11-03 09:48:47 -04:00
Santiago Fernandez Madero b9d768589e Fix System.Data.Odbc configurations for support package and run UpdateVSConfigurations (dotnet/corefx#24752)
* Fixed odbc configurations for compat package

* Run UpdateVSConfigurations

* Remove Default Configurations to help VS... comment from csproj's

* Remove from System.Buffers as well


Commit migrated from https://github.com/dotnet/corefx/commit/bcc59b2e74090cfbcc4d6e7c245c172744e9d46b
2017-10-23 18:24:28 -07:00
Steve MacLean 7a68b1e874 ConcurrentQueue 128-byte cache line (dotnet/corefx#22724)
ConcurrentQueue 128-byte cache line

Commit migrated from https://github.com/dotnet/corefx/commit/9c468a08151402a68732c784b0502437b808df9f
2017-09-17 09:38:49 -07:00
Eric St. John 6c5a247c17 Fix library packages overlapping with framework packages
Many library packages overlap with assemblies we include in our framework packages.

In the first release we handled this by preventing the library package from applying any
assets.

This becomes problematic if the reference assembly needs to version, and especially
if the library wants to add API.  The new version will be greater than what was previously
shipped inbox, and we wouldn't want to restrict the new version just to future TFMs.

To address this problem I've made a couple fixes:
1. For packages which are shipping brand new API that's not present in desktop, we'll
omit any placeholders and allow conflict resolution to decide if the library package
or framework package should be used (based on version).  In some cases this required
bringing some configurations into the package so that it could always be "up to date".

2. For packages which are just exposing API in desktop, and thus already tied/anchored
to netstandard versions, we'll freeze the reference assembly version for the non-desktop
builds.  This ensures that the reference assembly will never move past the version that's
inbox in the framework package.

Update BuildToolsVersion to 2.0.0-prerelease-01931-01


Commit migrated from https://github.com/dotnet/corefx/commit/7ee51be7ed472a12266c8cc2ab25a9e1862c1d00
2017-09-01 09:01:41 -07:00
Brian Chavez f866987b74 XML doc spelling corrections - I through P. 🚿 (dotnet/corefx#23651)
Commit migrated from https://github.com/dotnet/corefx/commit/b09fab5799bb1ca4bea4b4bb086d2c9870dd5191
2017-08-29 15:42:23 -07:00
Viktor Hofer 4265c618fa Remove unused serialization members (dotnet/corefx#22785)
* Remove unused serialization members

* Remove unused S.Security.Permissions serialization test code

* Remove duplicate test code. S.Drawing.Primitive type serialization is already throughly tested in S.Runtime.Serialization.Formatters.Tests

* Remove ConcurrentBag unused serialization code

* Removing unused Principal/Identity serialization code


Commit migrated from https://github.com/dotnet/corefx/commit/da047240f65309f45b477e31c8e63ca3f06b80f0
2017-07-31 17:48:06 -04:00