Граф коммитов

45 Коммитов

Автор SHA1 Сообщение Дата
Aaron Robinson 332a6f9234
Convert all possible `DllImport`s to `LibraryImport` for .NET 7+ (#41573)
* Convert all possible DllImports to LibraryImport for .NET 7+

* Explicitly declare entry point on Windows P/Invokes with W suffix.

* Mark as "ref struct".

* Consume latest source generator.

* Permit unsafe blocks.
2022-05-31 16:19:00 -07:00
Brennan 3ea008c80d
Add rule to seal internal and private types (#41457) 2022-05-05 09:26:05 -07:00
Damian Edwards 37c0ce91fd
Add option to project templates to use Program.Main instead of top-level statements (#40886)
Fixes #40877
2022-03-28 11:13:57 -07:00
Pranav K e059629e5e
Enable IDE0060 (#40461)
* Enable IDE0060

Contributes to https://github.com/dotnet/aspnetcore/issues/24055
2022-03-01 16:53:22 -08:00
Pranav K 1852bb7877
Enable CA1810 as a warning (#40384)
Contributes to https://github.com/dotnet/aspnetcore/issues/24055
Contributes to https://github.com/dotnet/aspnetcore/issues/32087

* This updates most of the repo to use LoggerMessageAttributes. MvcCoreLoggerExtensions is the only standout but it is fairly involved since it mixes logging from several types, re-uses logger ids etc
2022-02-24 18:08:35 -08:00
Doug Bunting 6ac8ebc38c
Make IDE0055 formatting rules suggestions (#40181)
- alternate to #40173
2022-02-12 14:38:53 -08:00
Pranav K 529c25db46
Update .editorconfig 2022-02-05 11:54:30 -08:00
Shreyas Jejurkar 545a398d94
Merge branch 'main' into CA2249 2022-02-05 12:15:54 +05:30
Shreyas Jejurkar 877672776e Refactor : Enable CA2249
1. Enables CA2249
2. formatted `.editorconfig`
2022-02-05 12:12:33 +05:30
Shreyas Jejurkar f486e78813
Refactor : Enable CA1847 (#39983)
CA 1847 - https://docs.microsoft.com/en-gb/dotnet/fundamentals/code-analysis/quality-rules/ca1847

Contributes to #24055
2022-02-04 11:07:30 -08:00
Pranav K b9d910778a
Enable CA2007 for all ns2.0 projects
Contributes to https://github.com/dotnet/aspnetcore/issues/24055
2022-02-02 17:21:36 -08:00
Pranav K de3019b7da
Enable IDE2000 (#39803)
Contributes to #24055
2022-01-27 08:02:32 -08:00
Pranav K 6850cc8187
Enable CA1844 (#39634)
Contributes to https://github.com/dotnet/aspnetcore/issues/24055
Fixes https://github.com/dotnet/aspnetcore/issues/39555
2022-01-19 13:06:36 -08:00
Brennan bca5f96e48
Update 'using' warning for test files (#39537) 2022-01-15 15:27:45 +00:00
Pranav K 07d728b517
Enable warnings for IDE0062 (#39463)
Contributes to https://github.com/dotnet/aspnetcore/issues/24055
2022-01-13 21:44:47 +00:00
Pranav K fd1891536f
Enable IDE0059 (#39434)
Contributes to https://github.com/dotnet/aspnetcore/issues/24055
2022-01-13 10:49:03 -08:00
Pranav K 2862028573
Bump up warning level for CA1822 (#39436)
Contributes to https://github.com/dotnet/aspnetcore/issues/24055
2022-01-11 07:47:40 -08:00
Pranav K 99f3f3291b
Enable IDE0051: Remove unused private members
Contributes to #24055
2022-01-06 17:57:38 +00:00
Pranav K 6aa132d64a
Enforce braces for code-blocks
Contributes to https://github.com/dotnet/aspnetcore/issues/24055 (#39320)
2022-01-05 20:25:17 +00:00
Pranav K 667f0685b5
Enforce warnings for unused usings (#39280)
* Enforce warnings for unused usings

Contributes to https://github.com/dotnet/aspnetcore/issues/24055
2022-01-03 21:26:26 +00:00
Shreyas Jejurkar c85baf8db0
chore : Remove unwanted `using` statement (#39176) 2022-01-02 06:39:22 -08:00
Pranav K c65dac77cf
Fixup whitespace issues from top-level statement change (#39161)
* Fixup whitespace issues from top-level statement change

The top-level statement codefix resulted in the formatting within
nested lambdas to be incorrect in a number of places. As a part of this change,
I enabled the styling diagnostic and re-ran the tool to correct these issues.
2021-12-23 06:35:24 +00:00
github-actions[bot] 3e354f3591
Sync shared code from runtime (#38143)
* Sync shared code from runtime

* Also exclude tests from file-scoped rules

Co-authored-by: Tratcher <Tratcher@users.noreply.github.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
2021-11-08 20:04:17 +00:00
Pranav K a450cb69b5
Use file scoped namespaces (#38076)
* Use file scoped namespaces
2021-11-06 00:52:08 +00:00
Pranav K e3230e5372
Re-enable CA1305 (#35867)
* Re-enable CA1305
Fixes https://github.com/dotnet/aspnetcore/issues/34361
2021-08-28 06:50:54 -07:00
Kevin Pilch d71ceb649c Update license from Apache -> MIT
Fixes #18873.
2021-07-22 15:36:47 -07:00
Damian Edwards 25767dee39
Update templates to use file scoped namespace declarations (#34220)
* Update templates to use file-scoped namespace declarations
* Move to SDK version that supports file-scoped namespaces
* Make CA1305 a suggestion rather than error
  - New compiler now makes this appear when using a StringBuilder with string interpolation. Logged #34361 to follow up.

Contributes to #33947
2021-07-15 01:28:54 +00:00
Pranav K 10beca5a98
Enable build time warnings for IDE code analysis rules (#34215)
* Enable build time warnings for IDE code analysis rules

* Enables build time warnings for readonly, modifier ordering and const
* Fixes all of the warnings

Contributes to https://github.com/dotnet/aspnetcore/issues/24055
2021-07-09 18:21:45 +00:00
Brennan f3ae70fdbb
Cleanup IDE errors in SignalR (#33918) 2021-07-02 10:26:03 -07:00
Pranav K 78ab4bd673
Soft enable CA1810 (#33659)
A lot of the warnings for this rule appear from logging. Given this is going
to be replaced by a source generator, this change soft enables the rule while
fixing warnings that appear in non-logging code

Contributes to #24055
2021-06-23 07:56:06 -07:00
Pranav K 98a8d7a2be
Enable more code analysis rules (#33303)
Adds CA1842, CA1843, CA2008-CA2011, CA2013, CA2014, CA2016, CA2200, CA2208
2021-06-14 22:28:29 +00:00
Safia Abdalla 94cdf2c470
Move CA1845 analyzer back to warning level (#33444)
* Move CA1845 analyzer back to warning level
* Fix warnings in src/ProjectTemplates/Shared/AspNetProcess.cs
2021-06-10 16:07:21 -07:00
William Godbe 6a929c3796
Update SDK (#33187)
* Update SDK

* Add diagnostic for tracing in test

* Try disable publish trimming

* Revert "Try disable publish trimming"

This reverts commit 766ae32611.

* Add BuiltInComInteropSupport

* Update global.json

* Update global.json

* Fix analyzer warning and clean up workarounds

* Fix up more analyzer warnings

* Fix CA1846 issues in WebEncoders and Http

* Fix CA1845 warnings in Logging.AzureAppServices

* Fix CA1845 warning in RazorPagesRazorViewEngineOptionsSetup

* Fix warning in FileProviderRazorProjectFileSystem

* Disable span warnings in tests

* Re-ordering

* Downgrade CA1846 to suggestion for projects

Co-authored-by: John Luo <johluo@microsoft.com>
Co-authored-by: Tanay Parikh <TanayParikh@users.noreply.github.com>
Co-authored-by: Safia Abdalla <safia@safia.rocks>
Co-authored-by: Safia Abdalla <safia@microsoft.com>
Co-authored-by: Pranav K <prkrishn@hotmail.com>
2021-06-09 19:47:20 -07:00
Pranav K ba6edfeab0
Enable CA1835-CA1841 (#33270)
* Enable CA1835-CA1841, CA1845, CA1846
2021-06-04 15:54:45 -07:00
Pranav K e4f7bfb435
Enable CA1821, CA1825-CA1834 (#33041)
* Enable CA1821, CA1825-CA1834

Contributes to https://github.com/dotnet/aspnetcore/issues/24055
2021-05-26 23:05:12 +00:00
Pranav K be5ba495b4
Enable CA1805 diagnostics (#32893)
* Enable CA1805 diagnostics
2021-05-21 13:35:20 -07:00
Pranav K af9bb41d62
Turn on some CodeAnalysis rules (#32837)
* Turn on some CodeAnalysis rules
2021-05-20 09:30:04 -07:00
Stephen Toub d86be87daa
Enable CA2012 (Use ValueTask Correctly) (#31221) 2021-03-26 13:31:10 +13:00
Youssef Victor 350ea5b181
Use NetAnalyzers from SDK instead of FxCopAnalyzers (#30138)
* Use analyzers from .NET SDK
2021-02-19 09:12:37 -08:00
Pranav K 8a81194f37
Enables code analysis rules about culture sensitive string operations (#26656)
* Enable string comparison FxCop rules
Co-authored-by: Kevin Pilch <me@pilchie.com>
2020-10-15 09:14:53 -07:00
Kevin Pilch 1da13e6501
Enable FxCop Analyzers for the repo (#23709)
All rules are currently disabled, except for one that I enabled for
src/Http via a new ".editorconfig" file I added there.

Other changes:

* Allow editorconfigs in MVC and Razor to flow to the root
* Consolidate a few editorconfig settings
* Tweak Ruleset config in Azure/AzureAD where it clashed.

Addresses the beginning of #9620, but it's a fair chunk of work to
enable most rules through the whole repo. That can be done directory by
directory and rule by rule by dropping .editorconfig files though.
2020-07-08 15:26:22 -07:00
Ajay Bhargav B 7f4b846e9f
Made the encodings of .razor and .cshtml files in the repo consistent (#23502)
* Added UTF8 BOMs to .razor and .cshtml files

* Fixes and unquarantined BOM tests

* Update .editorconfig
2020-06-30 12:03:01 -07:00
Ryan Nowak cb21edc500
Fix #7258 - remove components.server dependencies on blazor-specific plumbing (#7934)
* Removes a bunch of trivial usage of Blazor

... in names and comments where we don't specifically mean Blazor.

* Remove obsolete Startup from Components app

* Move UseBlazor into Blazor.Server

Moves UseBlazor and the related features in Blazor.Server - along with
some other general cleanup of misc shared files.

Now Components.Server has a much slimmer set of dependencies (MVC is
gone) and doesn't contain the "double startup" pattern that we
introduced (sorry).

We'll revisit UseBlazor and the dependencies there once the new
MapFallbackToFile support is available from static files.

* minor PR feedback

* Update reference assemblies

* fix broken test
2019-02-28 10:36:07 -08:00
Nate McMaster 968df9578b
Refactor shared framework projects targets and project layout (#3703)
This refactors the targets used to build the shared framework and its .zip files. There are lots of reasons motivating this: Arcade convergence, migration to VSTS, making it easier to build this locally, etc.

Changes:
* Moves move content of build/Sharedfx.{props/targets} into eng/targets/SharedFx.Common.{props/targets}
* Update the build to produce a `runtime.$rid.Microsoft.AspNetCore.App` package (not just the one with symbols in it)
* Refactor the targets which produce .tar.gz/.zip files into separate projects in `src/Installers/`
* Refactor installers, unit tests, and the framework projects to use ProjectReference to flow dependencies between different parts of the build.
* Makes it easier to build the shared framework locally (for the inner dev loop, you can run `dotnet build -p src/Framework/Microsoft.AspNetCore.App/src/ -r win-x64`)
2018-10-24 15:42:06 -07:00
Nate McMaster e841229782 Verify and mirror external dependencies and self-consistent package versions (#566)
Moves build logic from other infrastructure repos into aspnet/Universe.
2017-09-29 10:25:47 -07:00