Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-17Warn on RUC annotated attribute ctors (analyzer) (#2201)Mateo Torres-Ruiz
* Warn on usage of attributes with annotated ctors * PR feedback Add ProducedBy from Test Restructure Add support for SetupCompileBefore in the analyzer Run analyzer tests on all members (not only methods) Move tests to RequiresCapability * Enable analyzer tests for attributes which use RUC annotated properties * Lint * Rename CheckAttributeCtor Check for instantiations that set annotated properties * Apply suggestions from code review Co-authored-by: Andy Gocke <angocke@microsoft.com> * Update comment Rename Linker => Trimmer in ProducedBy * Fix applied suggestions * Lint Co-authored-by: Andy Gocke <angocke@microsoft.com>
2021-09-08Special case `MakeGenericMethod/Type` in RUC analyzer (#2209)Mateo Torres-Ruiz
* Add MakeGenericMethod and MakeGenericType to the special incompatible members of the RUC analyzer. * Don't produce diagnostics for MakeGenericMethod/MakeGenericType * Add comment * Lint
2021-09-08Update edited document before continuing code fixing (#2250)Mateo Torres-Ruiz
* PR feedback * Remove unnecessary method
2021-08-23Add static constructor behavior for RUC on type (#2207)Tlakaelel Axayakatl Ceja
Add new error code for cases in which the static constructor is annotated with RUC Add IL2116 to error codes Move static constructor verification in MarkField before pushing a new stack to print warnings in the method caller instead of fields Don't treat static constructors annotated with RUC as dangerous Add test for several static constructor calls Warn on field instead of warning on .cctor * Field should warn no matter the DependencyKind except DynamicallyAccessedMemberOnType * Add test for Access to field via reflection, dynamic dependency and using fields on attributes Co-authored-by: vitek-karas <vitek.karas@microsoft.com>
2021-08-03Typo (#2187)Mateo Torres-Ruiz
2021-08-03Add `dynamic` analyzer (#2150)Mateo Torres-Ruiz
* Use DiagnosticId * Update test/ILLink.RoslynAnalyzer.Tests/RequiresUnreferencedCodeAnalyzerTests.cs Co-authored-by: Andy Gocke <angocke@microsoft.com> * Lint Co-authored-by: Andy Gocke <angocke@microsoft.com>
2021-07-31Share DiagnosticStrings add mechanism to generate a DiagnosticDescriptor ↵Mateo Torres-Ruiz
given a DiagnosticId (#2170) * Add DiagnosticId enum Add GetDiagnosticDescriptor * Check that the diagnostic id is in the range of the supported linker warnings * Lint * Share DiagnosticString * Noisy whitespace * Warnings go up to 6000 inclusive * PR feedback * Get diagnostic string Update test * Lint * PR feedback
2021-07-27RAF Attribute unification (#2156)Tlakaelel Axayakatl Ceja
Bump sdk version in global.json Fix new analyzer recommendations about AsSpan and Contains(char) Disable ImplicitNamespaceImports Update Microsoft.NetCore.App.Ref used by analyzer to take new Runtime attribute changes Update analyzer to not use Message as a property in RequiresAssemblyFilesAttribute Update cecil to use Microsoft.NETFramework.ReferenceAssemblies.net40 1.0.2 along with taking other cecil updates
2021-06-30Use net6.0 reference assemblies in analyzer tests (#2121)Andy Gocke
The version is currently hardcoded in TestCaseUtils.cs, but since these are reference assemblies, as long as the surface area isn't predicted to change, we can update as necessary.
2021-06-30Better tests for various RUC scenarios and fixes (#2108)Vitek Karas
Adds several new tests for various RUC scenarios. Cleans up the RUC tests to correctly baseline all warnings it produces. Fixes a product issue with RUC on attribute property setter. Small refactoring in the product.
2021-06-23Match Attributes for virtual methods and overrides (#2046)Tlakaelel Axayakatl Ceja
Add analyzer logic to create a diagnostic if attributes don't match between all interface implementations or overrides Use IL2046 to display errors for RUC Use IL3003 to display errors for RAF Add IL3003 to error-codes.md Add tests Adds support for nullable attribute operations Add support for adding metadata information into the compilation Divide the current warning message into 4 different more insightful diagnostic messages following the structure implemented in ObsoleteAttribute messages Add IL2046 to diagnostic format to ILLink.Shared
2021-06-03Stop duplicating trailing period in IL2026 (#2053)Mateo Torres-Ruiz
* Don't duplicate trailing periods on IL2026 warning message * Do the same for RAF * Run lint.cmd
2021-06-01Add support for UnrecognizedReflectionAccessPattern in analyzer test infra ↵Mateo Torres-Ruiz
(#2048) * Refactor TestCaseUtils * Whitespace
2021-05-26Fix validation of ExpectedWarning attribute (#2057)Vitek Karas
Probably due to copy/paste error we've validated the attribute by looking at all warning messages at once. This means that potentially any warning can be matched to the attribute even if its location doesn't match. This change fixes that but uncovers some small test issues: * The expected warnings happen in different places - fixed that * Some warnings can't be reported by the Roslyn Analyzer as they require global view - added a mechanism to mark these Refactored a bit of the Roslyn analyzer validation code to support named properties in attributes.
2021-05-14Try to re-enable RequiresCapability tests (#2029)Andy Gocke
Stops looking for the first file in the `RequiresCapability` directory and instead looks at all the files.
2021-05-13Add RequiresAssemblyFiles CodeFix (#2015)Tlakaelel Axayakatl Ceja
Add RequiresAssemblyFiles CodeFix Add tests Fix #2005 Refactor analyzer code. Fixes #1986 Add resources files to codefixer
2021-05-06Add UnconditionalSuppressMessage codefixer (#2002)Tlakaelel Axayakatl Ceja
Add CodeFix for UnconditionalSuppressMessage Add test for UnconditionalSuppressMessage Change FindContainingMember to FindAttributableParent and add a list of AttributableParentTargets to values that are possible Add a base class to remove code duplication Use net5.0 reference assemblies and define requiresAssemblyFiles manually (reverts #1922)
2021-04-24Fix delegate conversion on analyzers (#1964)Tlakaelel Axayakatl Ceja
Fix delegate conversion on analyzers Fix test in RequiresUnreferencedCodeAnalyzer Add tests for delegate conversion Add the ability to pass the number of iterations in a codefix
2021-04-09Use CodeFixProvider project as analyzer package project (#1945)Andy Gocke
Bundles both the analyzer and codefix together as analyzers.
2021-04-01Merge SingleFileAnalyzer into RequiresAssemblyFilesAnalyzer and add ↵Tlakaelel Axayakatl Ceja
capability to suppress IL3000/IL3001 with RequiresAssemblyFilesAnalyzer (#1921) Merge SingleFileAnalyzer into RequiresAssemblyFilesAnalyzer Suppress warnings on dangerous patterns if RequiresAssemblyFilesAttribute is used on the parent call Fix case in which we have a dangerous method inside a property Add tests
2021-03-31Add codefix for RequiresUnreferencedCode (#1865)Andy Gocke
Simple codefix that just adds RequiresUnreferencedCode to the containing method if a RequiresUnreferencedCode analyzer warning fires.
2021-03-27Compile roslyn analyzer tests using repo's assembly refs (#1922)Mateo Torres-Ruiz
* Used repo's dotnet bits * Remove unused assembly * Just reference SPCL * Simplify * Remove using
2021-03-24[main] Update dependencies from dotnet/runtime (#1916)v6.0.100-preview.2.21174.1dotnet-maestro[bot]
[main] Update dependencies from dotnet/runtime - Disable unreliable test
2021-03-17Analyzer can warn on more RequiresUnreferencedCode cases (#1897)Tlakaelel Axayakatl Ceja
Add support in analyzer to detect RUC in overridden methods Add support in analyzer to detect RUC in static constructors Add test for overridden property
2021-03-15Warn on cctors annotated with RUC if a field triggers its marking (#1889)Mateo Torres-Ruiz
* Cctor marked because of accessed field should trigger warning * Ignore testcase in analyzer * Add tests Move field initialization to cctor * Add beforefieldinit test to list of tests ignored by the analyzer * Fix testname
2021-03-13Upgrade tests to net6 (#1891)Vitek Karas
2021-03-08Change MSBuild properties for analyzer (#1863)Tlakaelel Axayakatl Ceja
Change PublishSingleFile and PublishTrimmed for EnableSingleFileAnalyzer and EnableTrimAnalyzer in the linker
2021-03-01Enable more analyzers (#1862)Marek Safar
2021-02-18Bump dependencies (#1840)v6.0.100-preview.2.21118.1Marek Safar
2021-02-05RequiresAssemblyFilesAttribute resource manager changes (#1790)Tlakaelel Axayakatl Ceja
* Change resource file to have a default message and accept arguments * Add test for RequiresAssemblyFilesAttribute with Url named argument only * Add IL3XXX warning codes to the master error code registry * Throw whenever a named argument is passed in ExpectedWarning
2021-02-01Warn on called methods annotated with RequiresUnreferencedCode (#1778)Mateo Torres-Ruiz
* Only process direct calls and reflection method references. * Clean test * Add tests * Check for null origin * Warn on DynamicallyAccessedMember kind. * Update warnings message for Requires Unreferenced Code * Mark interfaces of types accessed via reflection * Fix whitespace * Add includeInterfaceTypes parameter * Keep set action for methods in MarkEntireType * Add test for dynamic dependency with RUC. * Fix DependencyKind in MarkTypeForDynamicallyAccessedMembers Pass null to origin's parameter when processing optimized overrides Add DynamicDependency to list of valid dependency kinds in ProcessRequiresUnreferencedCode * Fix formatting
2021-01-20Add analyzer for RequiresAssemblyFilesAttribute (#1722)Mateo Torres-Ruiz
2021-01-20Clean up projects settings (#1765)Marek Safar
2021-01-19Remove monolinker build support (#1760)Marek Safar
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2021-01-04Support for RequiresAndCallsOtherRequiresMethods (#1706)Tlakaelel Axayakatl Ceja
-Check parent to see if it has any UnreferencedCodeAttribute -Since allowMultiple is disabled by default, only check the attributes until first UnreferencedCodeAttribute is found
2020-12-09Port single-file analyzer (#1665)Mateo Torres-Ruiz
* Add single-file analyzer * Add tests * Use str constant * Update Resources * Update tests * PR feedback * Remove mysterious filename from comments * Add helper method for single-file diagnostic verification * Refactor MSBuild properties * Add test with PublishSingleFile not set
2020-12-03Roslyn analyzer improvements (#1622)Tlakaelel Axayakatl Ceja
* Add supported diagnostics for when we use Url named argument * Add support for Expected Warning * Use single format for Resource file * Dont execute test that used another diagnostic id that is not 2026 * Change formats in the linker for setters and getters to match C# format * Use GetSignature in method instead of ToString()
2020-10-27Add first roslyn analyzer (#1563)Andy Gocke
This analyzer approximates the warnings produced by the linker around the RequiresUnreferencedCodeAttribute.