netfabric / netfabric.hyperlinq.analyzer Goto Github PK
View Code? Open in Web Editor NEWA Roslyn analyzer with rules related to generation and consumption of enumerables and async enumerables in C#.
License: MIT License
A Roslyn analyzer with rules related to generation and consumption of enumerables and async enumerables in C#.
License: MIT License
X:\src\Microsoft.PowerShell.Commands.Utility\Microsoft.PowerShell.Commands.Utility.csproj : error NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Workspaces 3.9.0 requires Microsoft.CodeAnalysis.CSharp (= 3.9.0) but version Microsoft.CodeAnalysis.CSharp 3.10.0 was resolved. [X:\src\powershell-win-core\powershell-win-core.csproj]
Migrate the target framework from netcoreapp3.1
to net6.0
β a supported LTS version.
https://devblogs.microsoft.com/dotnet/net-core-3-1-will-reach-end-of-support-on-december-13-2022/
Hi!
The following code reports a false positive for rule HLQ002
. I guess it has to do with the return type. Being a string, it does implement IEnumerable<char>
, but returning a null in these kinds of methods should normally be fine in my opinion.
namespace ReproHLQ002
{
public static class ClaimsExtensions
{
public static string SomeMethod()
{
const string x = "";
if (string.IsNullOrEmpty(x))
{
// analyzer reports HLQ002 (Enumerable cannot be null. Return an empty enumerable instead.) on the next line
return null;
}
return x;
}
}
}
Thanks for your time!
When trying to update the Microsoft.CodeAnalysis.Common to version 3.11.0, I get the following error :
Error NU1107 Version conflict detected for Microsoft.CodeAnalysis.Common. Install/reference Microsoft.CodeAnalysis.Common 3.11.0 directly to project MyProject to resolve this issue.
MyProject -> Microsoft.CodeAnalysis.CSharp 3.11.0 -> Microsoft.CodeAnalysis.Common (= 3.11.0)
MyProject -> NetFabric.Hyperlinq.Analyzer 2.0.4 -> Microsoft.CodeAnalysis.CSharp.Workspaces 3.10.0 -> Microsoft.CodeAnalysis.Common (= 3.10.0).
This package has been deprecated as it is legacy and is no longer maintained.
Additionally, according to documentation this package does not work with .NET Core 3.1, which the test project is targeting.
See https://www.nuget.org/packages/dotnet-reportgenerator-cli/
Would be nice to have a vsix version of this analyzer.
The documentation for Enumerable.Single
states:
Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.
If any of the Single
operators is being used to get the first item, then it's being as wrongly used as using the First
operators to the the single item.
If query a service for a customer ID and the service returns 2 different customers with the same ID, than something went wrong and you must stop what you're doing. Single
assures you that, First
allows your to add to the problem.
When you go to a parking lot, you park your car on the first available spot. When you leave, you get the single car - your car - not the first one you find. At least, most of society hopes you do. π
When upgrading from 2.0.4Β to 2.1.0 my builds start failing with multiple occurences of the following error message:
CSC : error AD0001: Analyzer 'NetFabric.Hyperlinq.Analyzer.AssignmentBoxingAnalyzer' threw an exception of type 'System.IO.FileNotFoundException' with message 'Could not load file or assembly 'NetFabric.CodeAnalysis, Version=4.1.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.'.
. Most of the projects are targeting net48.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.