Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aarnott/csharpisnull
C# null test syntax analyzers to guard against bugs in testing null against a struct.
https://github.com/aarnott/csharpisnull
analyzer
Last synced: 2 months ago
JSON representation
C# null test syntax analyzers to guard against bugs in testing null against a struct.
- Host: GitHub
- URL: https://github.com/aarnott/csharpisnull
- Owner: AArnott
- License: mit
- Created: 2021-08-23T14:33:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-15T16:17:22.000Z (6 months ago)
- Last Synced: 2024-11-01T13:42:02.782Z (2 months ago)
- Topics: analyzer
- Language: PowerShell
- Homepage:
- Size: 763 KB
- Stars: 13
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# C# null test syntax analyzers
[![NuGet package](https://img.shields.io/nuget/v/CSharpIsNullAnalyzer.svg)](https://nuget.org/packages/CSharpIsNullAnalyzer)
[![NuGet package](https://img.shields.io/badge/nuget-From%20CI-yellow)](https://dev.azure.com/andrewarnott/OSS/_packaging?_a=package&feed=PublicCI&package=CSharpIsNullAnalyzer&version=0.1.278-beta&protocolType=NuGet)
[![Build Status](https://dev.azure.com/andrewarnott/OSS/_apis/build/status/CSharpIsNull?branchName=main)](https://dev.azure.com/andrewarnott/OSS/_build/latest?definitionId=54&branchName=main)## Features
* Guard against bugs from testing structs against `null`.
* Bulk code fix will update all your code at once.### Analyzers
* [CSIsNull001](doc/analyzers/CSIsNull001.md) to catch uses of `== null`
* [CSIsNull002](doc/analyzers/CSIsNull002.md) to catch uses of `!= null`## Consumption
Install it via NuGet through the nuget badge at the top of this file.
### Consume from CI
To get the very latest analyzer [from my CI feed](https://dev.azure.com/andrewarnott/OSS/_packaging?_a=package&feed=PublicCI&package=CSharpIsNullAnalyzer&protocolType=NuGet):
[Connect to the feed](https://dev.azure.com/andrewarnott/OSS/_packaging?_a=connect&feed=PublicCI):
```xml
```
Then install the package with this command in your Package Manager Console:
```ps1
Install-Package CSharpIsNullAnalyzer -pre
```