Commit Graph
36 Commits
Author SHA1 Message Date
Stephen Toub 4fc5d8971d Contribute to IDE0055 (fix formatting)
Commit migrated from https://github.com/dotnet/corefx/commit/b49a8a9be1d53cd9e50cb68fd8540be25c65d433
2019-08-24 07:47:35 -04:00
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
Erhan Atesoglu 0fb53ffdc9 Fixed filename case issue (dotnet/corefx#40457)
Commit migrated from https://github.com/dotnet/corefx/commit/c71d095e3e57e0ad2a75d8d97b93cdceb4f7f720
2019-08-20 16:29:34 -04:00
Stephen Toub 9885a60658 Fix IDE0066 across corefx (dotnet/corefx#40288)
* Fix IDE0066 across corefx

"Fix all", but then manual tweaking to accommodate places the rule doesn't work quite right.

* Address PR feedback


Commit migrated from https://github.com/dotnet/corefx/commit/f71a5a1d88214a9e2c26ff2ff8bcfb1017aa6713
2019-08-16 11:24:54 -04:00
Stephen Toub cae3309c0a Fix non-ASCII characters across corefx (dotnet/corefx#40318)
* Fix several non-visible characters in test files

* Replace Unicode surrogate pairs with escaped hex values

* Fix non-ASCII characters in most C# files


Commit migrated from https://github.com/dotnet/corefx/commit/027eb8e19c3498cc2c656931c3b879f5ddb63b0d
2019-08-15 08:17:46 -04:00
Stephen Toub 44292e42a6 Remove duplicate casts from DbMetaDataFactory (dotnet/corefx#40328)
Commit migrated from https://github.com/dotnet/corefx/commit/66273ed9944c7c964d3d51771ed8d4b4ddce3e8c
2019-08-14 23:59:34 -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 6a988c7d03 Enable StyleCop rules 1205, 1411, 1026, and 1000 (dotnet/corefx#40254)
* Fix StyleCop warning SA1411 (attribute ctor shouldn't use unnecessary parens)

* Fix StyleCop warning SA1026 (new[] spacing)

* Fix StyleCop warning SA1000 (consistent spacing around if, for, switch, etc.)

* Fix StyleCop warning SA1205 (partial elements should declare an access modifier)


Commit migrated from https://github.com/dotnet/corefx/commit/0c4c234a918254d569ffb0f6a607f98193608646
2019-08-12 22:45:34 +02: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 6deaea9fd4 Re-enable StyleCop warning SA1112 (closing paren on opening paren line)
Commit migrated from https://github.com/dotnet/corefx/commit/26a06c975ab4ea2afdb055a7d58870744964657e
2019-08-07 19:15:26 -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
Stephen Toub 3364838e1e Re-enable CA1823 (unused private fields) (dotnet/corefx#39899)
Commit migrated from https://github.com/dotnet/corefx/commit/e5d38a54cf21f6427ae4fe99c3841c8067139e75
2019-07-31 08:04:33 -04:00
Stephen Toub f78cb0b72c Re-enable xunit warning 2005 (dotnet/corefx#39866) (dotnet/corefx#39864)
Commit migrated from https://github.com/dotnet/corefx/commit/9142b477f9355ed184df326d7cd1de4963631228
2019-07-30 08:45:39 -04:00
Zoey McCulloughandJeremy Barton 6820071ac0 Re-enable xunit warning 2002 dotnet/corefx#39696 (dotnet/corefx#39706)
* Removed null checks on value types and enabled xunit 2002

* Updated Fill_OpenDataReader_Throws to use range check

Updated Fill_OpenDataReader_Throws to use range check for passing path

* Removed uneeded asserts and updated others

- Removed any assert for a valuetype where it was succeeded by a value type assertion (e.g. Assert.Equal(1, 1))
- Updated reflection tests to check flags for the specified scenario

* Update src/Microsoft.VisualBasic.Core/tests/FileSystemTests.cs

Co-Authored-By: Jeremy Barton <[email protected]>

* Update src/System.Reflection/tests/AssemblyNameTests.cs

Co-Authored-By: Jeremy Barton <[email protected]>

* Fixed failing reflection tests and removed Assert.NotNull for enum

* Pulled ruleset up from master to merge

* Cleaned up assert ordering for TestGuid

* Updated TestResponseWithoutContentEvents

- Asserted for 200 OK based on response from DefaultAzureServer + EmptyContentHandler


Commit migrated from https://github.com/dotnet/corefx/commit/c96e389f803b043753558878fefb575f3f85c934
2019-07-26 09:58:06 -04:00
Ahson Khan c59af1de67 Auto-generate the reference assemblies to normalize them (dotnet/corefx#39681)
* Update Microsoft.VisualBasic.Core ref

* Update System.Collections.Concurrent ref

* Update System.Collections.Immutable ref

* Update System.Collections ref

* Update System.ComponentModel.Composition ref

* Update System.Data.Common ref

* Update System.Data.OleDb ref

* Update System.Data.SqlClient ref for netcoreapp

* Update System.Diagnostics.DiagnosticSource ref and DiagnosticSourceActivity.cs

* Update System.IO.Packaging ref for netcoreapp

* Update System.IO.Pipelines ref

* Update System.Linq ref

* Update System.Net.Http ref

* Update System.Net.Security ref

* Update System.Numerics.Tensors ref

* Update System.Reflection.Emit for netcore

* Update System.Security.AccessControl ref

* Update System.Security.Permissions ref

* Update System.ServiceModel.Syndication ref

* Update System.Text.Encodings.Web ref

* Update System.Threading.Channels ref for netcoreapp

* Update System.Utf8String.Experimental ref

* Update System.Utf8String.Experimental csproj to reference new file.

* Upat eSystem.Runtime ref and Manual ref

* Update Microsoft.Bcl.AsyncInterfaces ref

* Disable warning CS8617 for missing nullability annotations within
explicit interface methods.

* Revert System.Runtime.cs back to what's in master.

* Update System.Runtime ref (single change - System.Char -> char).

* Revert System.Collections.Immutable back to what's in master (keep
readonly on private fields).

* Update System.Runtime ref and add comment in Manual ref file for
TypedReference.


Commit migrated from https://github.com/dotnet/corefx/commit/bdd0814360d4c3a58860919f292a306242f27da1
2019-07-25 03:44:48 +00:00
Stephen Toub 82fbdbdef2 Re-emable CA1507 (use nameof) (dotnet/corefx#39731)
Commit migrated from https://github.com/dotnet/corefx/commit/c265373119bc0449d347862862b43de35a95b186
2019-07-24 13:14:01 -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 51727a6ef6 Fix ordering of visibility and abstract/virtual/override (dotnet/corefx#39590)
To conform to expected style across corefx.

Commit migrated from https://github.com/dotnet/corefx/commit/b95ad3c0f9066fa426754bd6e3379fbaca24834e
2019-07-18 14:21:08 -04:00
Tom Deseyn f48f39fa5c Socket: improve cross-platform behavior on Dispose (dotnet/corefx#38804)
* Add tests

* Don't skip SyncSendFileGetsCanceledByDispose on .NET Framework

* Implement using code from previous PR

* Update SocketErrors when CleanedUp for APM APIs

* Cleanup SO_TYPE socket length handling (Fixes https://github.com/dotnet/corefx/issues/38750)

* SyncSendFileGetsCanceledByDispose: remove SkipTargetFramework NetFramework

* PR feedback

* Fix comment typo

* Also wait for async operations, and wait longer on each retry

* clear sockaddr using memset

* Fix build

* Only perform CLOEXEC check for non-abortive close


Commit migrated from https://github.com/dotnet/corefx/commit/9b2f7a834691a3bbad2949181eec707dd4b5a13b
2019-07-17 11:48:33 -04:00
Maryam Ariyan 57db927206 Fix and re-enable outerloop test on OLEDB (dotnet/corefx#38024)
Commit migrated from https://github.com/dotnet/corefx/commit/477abf147d8860fae35f975fddafb2711ee42bd4
2019-07-04 11:00:02 -07:00
David Shulman 935edadf9a Revert "Socket: Linux: unblock synchronous socket operations on Dispose (dotnet/corefx#37486)" (dotnet/corefx#38764)
This reverts commit dotnet/corefx@3fac6ad5bc.

Commit migrated from https://github.com/dotnet/corefx/commit/42ecf717478504fd7cc072f3586c6edd1ba57daa
2019-06-21 16:51:34 -07:00
Tom Deseyn 200afe9208 Socket: Linux: unblock synchronous socket operations on Dispose (dotnet/corefx#37486)
* Socket: Linux: unblock synchronous socket operations on Dispose

* Fix windows build

* TryUnblockSocket: always do an abortive close for TCP

* TryUnblockSocket: experiment, always call Shutdown

* SyncTcpReceiveSendGetsCancelledByDisposeOrClose: Don't check for abortive close

* Fix build

* Revert always shutdown to compare CI results

* PR feedback

* TcpReceiveSendGetsCanceledByDisposeOrClose: fix timing race

* TcpReceiveSendGetsCanceledByDisposeOrClose: fix timing race II

* Fix test

* TcpReceiveSendGetsCanceledByDisposeOrClose: fix timing race III

* TcpReceiveSendGetsCanceledByDisposeOrClose: only run on Sync

* Also perform abortive close when canceling async send/receive

* Fix aborted set to true

* Check what fails on OSX with Shutdown

* Revert "Check what fails on OSX with Shutdown"

This reverts commit dotnet/corefx@5ab7fce93c.

* Don't perform abortive close for operations that were already canceled

* interrup  Accept/Listen on OSX

* Find out what Disconnectx does for different tests on CI machines

* Move Linux connect AF_UNSPEC and OSX disconnectx into pal Disconnect function, update tests for OSX

* Trigger CI

* TcpReceiveSendGetsCanceledByDispose: check SocketErrorCode

* TcpReceiveSendGetsCanceledByDispose: OSX is also performing an RST close for disconnectx

* Revert "TcpReceiveSendGetsCanceledByDispose: OSX is also performing an RST close for disconnectx"

This reverts commit dotnet/corefx@a8d5b02724.

* TcpReceiveSendGetsCanceledByDispose: fix test for OSX

* call CancelIoEx to kick out pending operations

* Socket interop: replace IntPtr with SafeHandle

* Windows: RST close when operations were canceled

* Extend tests to check local SocketError

* test: update expected SocketErrors

* update tests: Apm API throws ObjectDisposedException instead of SocketException

* Extend asserts

* Update expected result for ConnectTask

* Update tests based on Windows behavior (https://github.com/dotnet/corefx/pull/37706)

* Map SocketErrors in Socket.cs

* Rewrite nullable asserts

* Fix test for Mac

* Handle SendFile SocketError

* SyncSendFileGetsCanceledByDispose: change how we generate the large file

* SyncSendFileGetsCanceledByDispose: ensure unique filename

* Fix NETFX build

* SyncSendFileGetsCanceledByDispose: skip on NetFramework

* PR feedback

* Fix broken build

* Perform DangerousAddRef for Socket used with UpdateAcceptContext socket option


Commit migrated from https://github.com/dotnet/corefx/commit/3fac6ad5bc4576eb2216ccb24fbed2bf173d41f4
2019-06-20 09:31:18 -07:00
Erhan Atesoglu c7528faaad Fixed CaseSenstive Issues (dotnet/corefx#38532)
Commit migrated from https://github.com/dotnet/corefx/commit/dc9a0f2c5c3e1718a75a9ed508e8a06309c174fb
2019-06-17 22:32:43 -07: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
Maryam Ariyan 5da855c199 Add missing APIs for OleDb (dotnet/corefx#38235)
Commit migrated from https://github.com/dotnet/corefx/commit/c63e5ebecc5449a360b6293ecdbf151bfd11a1a6
2019-06-05 13:27:50 -07:00
Maryam Ariyan f5181149b4 skip oledb for outerloop failures (dotnet/corefx#38090)
Commit migrated from https://github.com/dotnet/corefx/commit/8b590bc41ebbb7f51f733f40e04e03e8619ca23a
2019-05-31 08:36:59 -07:00
Maryam Ariyan 2938b81cd6 Re-enables OLEDB tests and Fixes SEHException (dotnet/corefx#37540)
Fixes: dotnet/corefx#37538

Commit migrated from https://github.com/dotnet/corefx/commit/2c64705c1aa8ecd9278ac8b8f692bf980d3b3fd3
2019-05-10 14:06:16 -07:00
Maryam Ariyan 5b0836a857 Adds more OleDb tests (dotnet/corefx#37509)
Commit migrated from https://github.com/dotnet/corefx/commit/3070e0484558aaaaf3547ede2f285544d0a3ed00
2019-05-09 04:04:55 -07:00
Maryam Ariyan c840f9ad60 skip all OleDb tests first to unblock other PRs. (dotnet/corefx#37539)
Commit migrated from https://github.com/dotnet/corefx/commit/f7cd353ab8b08ff45d45985851505e5f8f19f9ac
2019-05-09 02:17:53 -07: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
Viktor Hofer a87da6c63d Disable GetSchema test on Win7 (dotnet/corefx#37450)
Commit migrated from https://github.com/dotnet/corefx/commit/f5c963fabcca42d7f2ad9b3c313d93abe7d3d37a
2019-05-05 20:43:13 -04:00
Maryam Ariyan 370e98d559 System.Data.OleDb.Tests.OleDbConnectionTests.GetSchema failed in CI (dotnet/corefx#37438)
Fixes dotnet/corefx#37411
- Remove small bit of dead code.
- Add test and cleanup test code
- Fix System.Data.OleDb.Tests.OleDbConnectionTests.GetSchema failure on CI

Commit migrated from https://github.com/dotnet/corefx/commit/742d6367892167256617de5c3c7b9b1eae67bea2
2019-05-04 07:33:21 -07:00
Maryam Ariyan 5c234a161b Ports System.Data.OleDb (dotnet/corefx#37101)
Commit migrated from https://github.com/dotnet/corefx/commit/5374d01ef2337a85adc13a2b2cf0a354c6199c86
2019-05-02 10:42:33 -07:00