Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make generated code #nullable enable #41

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// <auto-generated>
// THIS (.cs) FILE IS GENERATED BY UnitGenerator. DO NOT CHANGE IT.
// </auto-generated>
#pragma warning disable CS8669
#pragma warning disable CS8625
#nullable enable
using System;
#if NET7_0_OR_GREATER
using System.Numerics;
Expand All @@ -16,7 +15,7 @@ internal class UnitOfAttribute : Attribute
public Type Type { get; }
public UnitGenerateOptions Options { get; }
public UnitArithmeticOperators ArithmeticOperators { get; set; } = UnitArithmeticOperators.All;
public string ToStringFormat { get; set; }
public string? ToStringFormat { get; set; }

public UnitOfAttribute(Type type, UnitGenerateOptions options = UnitGenerateOptions.None)
{
Expand Down
5 changes: 2 additions & 3 deletions src/UnitGenerator/SourceGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ private void SetDefaultAttribute(GeneratorPostInitializationContext context)
// <auto-generated>
// THIS (.cs) FILE IS GENERATED BY UnitGenerator. DO NOT CHANGE IT.
// </auto-generated>
#pragma warning disable CS8669
#pragma warning disable CS8625
#nullable enable
using System;
#if NET7_0_OR_GREATER
using System.Numerics;
Expand All @@ -130,7 +129,7 @@ internal class UnitOfAttribute : Attribute
public Type Type { get; }
public UnitGenerateOptions Options { get; }
public UnitArithmeticOperators ArithmeticOperators { get; set; } = UnitArithmeticOperators.All;
public string ToStringFormat { get; set; }
public string? ToStringFormat { get; set; }

public UnitOfAttribute(Type type, UnitGenerateOptions options = UnitGenerateOptions.None)
{
Expand Down
Loading