* Add analzyer for pubternal
This is based on some existing code from EF. I'm having a discussion
with them right now on the best way to share this logic.
I also added support for parameters here which was missing. We might
want to make this code converge with `BannedApiAnalyzer` which is much
more thorough than this.
This is using our existing package for testing analyzers thats the
*official* way to do it in our repo. Filed #12868 to track that.
* Add S C A R Y warnings to render tree types
* PR feedback
- In preview8 we warned users for non-public `[Parameter]`s and `[Parameter]` setters. For preview9 this is now an error because things will not work as they expect.
- Updated existing tests to reflect the new error expectation.
#12294
- The newly added analyzer warns users if they try to assign another components parameter.It does sanity checks to ensure that
1. The property reference is indeed a component parameter
2. The property reference is from a component
3. The assignment is outside of the parameters type hierarchy. Aka, we don't warn users for setting a components parameter if it's in the same class.
- Updated existing `ComponentsFacts` to add additional utility methods to properly interact with components.
- Added tests to ensure we're analyzing all the goods properly.
#8825
- Today all of our analyzer warnings only operate on `[Parameter]` properties.
- Updated existing test to not expect `CascadingParameter` as a possible error case.
- Added a new test to ensure we skip `CascadingParameter`s.
#8825
- Chose the name `DisableImplicitComponentAnalyzers` (DICA) to not conflict with `DisableImplicitAspNetCoreAnalyzers` (DIAA). The goal with this flag is that in the SDK we can read its value and do one of the following:
| DICA | DIAA | Action |
|---------|---------|------------------------------------------------------------------------------------------------------------|
| `true` | `true` | No component analyzers added from SDK, remove the component analyzers that were added from the package ref |
| `true` | `false` | No component analyzers added from SDK |
| `false` | `true` | No component analyzers added from SDK |
| `false` | `false` | Component analyzers added in SDK |
#8825
- If we find a parameter that is non-public we will create a warning for that situation and notify the user.
- Updated the naming of existing properties and classes that referred to public/private required properties to be specific to those properties setters (that's what they verified before these changes).
- Updated test expectations and names.
- Changed the code fix provider to no longer worry about the property setters and instead inspect the properties declared accessibility. Did not re-add the property setter code fix provider because these code fix providers do nothing in practice (Razor light bulbs aren't enabled in the editor).
- Added new tests.
#8825
* Add basic tests for duplicate attributes
* Add AddMultipleAttributes improve RTB
- Adds AddMultipleAttributes
- Fix RTB to de-dupe attributes
- Fix RTB behaviour with boxed EventCallback (#8336)
- Add lots of tests for new RTB behaviour and EventCallback
* Harden EventCallback test
This was being flaky while I was running E2E tests locally, and it
wasn't using a resiliant equality comparison.
* Add new setting on ParameterAttribute
Adds the option to mark a parameter as an *extra* parameter. Why is this
on ParameterAttribute and not a new type? It makes sense to make it a
modifier on Parameter so you can use it both ways (explicitly set it, or
allow it to collect *extras*).
Added unit tests and validations for interacting with the new setting.
* Add renderer tests for 'extra' parameters
* Refactor Diagnostics for more analyzers
* Simplify analyzer and fix CascadingParameter
This is the *easy way* to write an analyzer that looks at declarations.
The information that's avaialable from symbols is much more high level
than syntax. Much of what's in this code today is needed to reverse
engineer what the compiler does already. If you use symbols you get to
benefit from all of that.
Also added validation for cascading parameters to the analyzer that I
think was just missing due to oversight.
The overall design pattern here is what I've been converging on for the
ASP.NET Core analyzers as a whole, and it seems to scale really well.
* Add analyzer for types
* Add analyzer for uniqueness
This involved a refactor to run the analyzer per-type instead of
per-property.
* Fix project file
* Adjust name
* PR feedback on PCE and more renames
* Remove unused parameter
* Fix#10398
* Add E2E test
* Pranavs cool feedback
* Optimize silent frame removal
* code check
* pr feedback
This is the first step, and just estabilishes a skeleton. The end goal
is organize our analyzers under this node because:
1. We're writing some 'top level' analyzers that depend on everything
else
2. We want to be able to service analyzers on the SDK schedule
(independent of runtime).
Next, we'll merge the MVC analyzers into this assembly since there's no
reason for them to be separate. The MVC API analyzers will remain a
separate package, but under this node. The component analyzers will
remain separate as they need to ship as a package, but will move under
this node as well.
* 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
Changes:
* Remove obsolete targets which are unnecessary now that this repo no longer builds git submodules in a separate build process
* Remove the need for static analysis of 'ArtifactInfo' items
* Simplify how the code signing task is configured
* Remove unused repo tasks
* Remove duplicate lists of external dependencies and packages to be produced
* Remove obsolete build definition
* Remove obsolete build script parameters
* Add VisualStudioSetupOutputPath