Add type pre-condition to selectors and suppression groups #2702 #1477
build.yaml
on: pull_request
Build extension
1m 3s
Build module
3m 32s
Build docs
49s
🔍 Analyze with PSRule
34s
🔍 Analyze with DevSkim
31s
🔍 Analyze with CodeQL
3m 22s
Matrix: test_extension
Matrix: test_module
Annotations
3 errors and 58 warnings
Build module:
tests/PSRule.Tests/Definitions/Selectors/SelectorVisitorTests.cs#L9
Using directive is unnecessary.
|
Build module:
tests/PSRule.Tests/FunctionBuilderTests.cs#L6
Using directive is unnecessary.
|
Build module
Process completed with exit code 1.
|
🔍 Analyze with DevSkim
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
🔍 Analyze with PSRule
Target object 'src/PSRule/PSRule.Format.ps1xml' has not been processed because no matching rules were found.
|
🔍 Analyze with PSRule
Target object 'docs/assets/stylesheets/extra.css' has not been processed because no matching rules were found.
|
Build docs
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Build extension
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Build extension:
src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs#L22
Nullability of reference types in return type of 'IPipelineWriter? ResourceCacheDiscoveryContext.Writer.get' doesn't match implicitly implemented member 'IPipelineWriter IResourceDiscoveryContext.Writer.get' (possibly because of nullability attributes).
|
Build extension:
src/PSRule/Converters/Json/LanguageExpressionJsonConverter.cs#L175
Possible null reference argument for parameter 'item' in 'void List<object>.Add(object item)'.
|
Build extension:
src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs#L191
The type 'YamlDotNet.Core.Events.Scalar?' cannot be used as type parameter 'T' in the generic type or method 'ParserExtensions.TryConsume<T>(IParser, out T)'. Nullability of type argument 'YamlDotNet.Core.Events.Scalar?' doesn't match constraint type 'YamlDotNet.Core.Events.ParsingEvent'.
|
Build extension:
src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs#L210
The type 'YamlDotNet.Core.Events.Scalar?' cannot be used as type parameter 'T' in the generic type or method 'ParserExtensions.TryConsume<T>(IParser, out T)'. Nullability of type argument 'YamlDotNet.Core.Events.Scalar?' doesn't match constraint type 'YamlDotNet.Core.Events.ParsingEvent'.
|
Build extension:
src/PSRule/Runtime/Binding/TargetBindingContext.cs#L44
Dereference of a possibly null reference.
|
Build extension:
src/PSRule/Runtime/Binding/TargetBindingContext.cs#L46
Dereference of a possibly null reference.
|
Build extension:
src/PSRule/Pipeline/Runs/Run.cs#L19
Non-nullable field '_TargetBinder' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
|
Build extension:
src/PSRule/Pipeline/Runs/Run.cs#L84
Dereference of a possibly null reference.
|
Build extension:
src/PSRule/Pipeline/Runs/Run.cs#L88
Possible null reference argument for parameter 'option' in 'WildcardMap<RuleOverride>? Run.WithOverride(OverrideOption option)'.
|
Build extension:
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L73
Possible null reference argument for parameter 'expression' in 'LanguageExpressionOuterFn LanguageExpressionBuilder.Expression(string path, LanguageExpression expression)'.
|
🧪 Test extension (ubuntu-latest)
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
🧪 Test extension (ubuntu-latest):
src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs#L22
Nullability of reference types in return type of 'IPipelineWriter? ResourceCacheDiscoveryContext.Writer.get' doesn't match implicitly implemented member 'IPipelineWriter IResourceDiscoveryContext.Writer.get' (possibly because of nullability attributes).
|
🧪 Test extension (ubuntu-latest):
src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs#L191
The type 'YamlDotNet.Core.Events.Scalar?' cannot be used as type parameter 'T' in the generic type or method 'ParserExtensions.TryConsume<T>(IParser, out T)'. Nullability of type argument 'YamlDotNet.Core.Events.Scalar?' doesn't match constraint type 'YamlDotNet.Core.Events.ParsingEvent'.
|
🧪 Test extension (ubuntu-latest):
src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs#L210
The type 'YamlDotNet.Core.Events.Scalar?' cannot be used as type parameter 'T' in the generic type or method 'ParserExtensions.TryConsume<T>(IParser, out T)'. Nullability of type argument 'YamlDotNet.Core.Events.Scalar?' doesn't match constraint type 'YamlDotNet.Core.Events.ParsingEvent'.
|
🧪 Test extension (ubuntu-latest):
src/PSRule/Converters/Json/LanguageExpressionJsonConverter.cs#L175
Possible null reference argument for parameter 'item' in 'void List<object>.Add(object item)'.
|
🧪 Test extension (ubuntu-latest):
src/PSRule/Runtime/Binding/TargetBindingContext.cs#L44
Dereference of a possibly null reference.
|
🧪 Test extension (ubuntu-latest):
src/PSRule/Runtime/Binding/TargetBindingContext.cs#L46
Dereference of a possibly null reference.
|
🧪 Test extension (ubuntu-latest):
src/PSRule/Pipeline/PSHostContext.cs#L46
Possible null reference return.
|
🧪 Test extension (ubuntu-latest):
src/PSRule/Pipeline/Runs/Run.cs#L19
Non-nullable field '_TargetBinder' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
|
🧪 Test extension (ubuntu-latest):
src/PSRule/Pipeline/Runs/Run.cs#L84
Dereference of a possibly null reference.
|
🧪 Test extension (ubuntu-latest):
src/PSRule/Pipeline/Runs/Run.cs#L88
Possible null reference argument for parameter 'option' in 'WildcardMap<RuleOverride>? Run.WithOverride(OverrideOption option)'.
|
🧪 Test extension (macos-latest):
src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs#L22
Nullability of reference types in return type of 'IPipelineWriter? ResourceCacheDiscoveryContext.Writer.get' doesn't match implicitly implemented member 'IPipelineWriter IResourceDiscoveryContext.Writer.get' (possibly because of nullability attributes).
|
🧪 Test extension (macos-latest):
src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs#L191
The type 'YamlDotNet.Core.Events.Scalar?' cannot be used as type parameter 'T' in the generic type or method 'ParserExtensions.TryConsume<T>(IParser, out T)'. Nullability of type argument 'YamlDotNet.Core.Events.Scalar?' doesn't match constraint type 'YamlDotNet.Core.Events.ParsingEvent'.
|
🧪 Test extension (macos-latest):
src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs#L210
The type 'YamlDotNet.Core.Events.Scalar?' cannot be used as type parameter 'T' in the generic type or method 'ParserExtensions.TryConsume<T>(IParser, out T)'. Nullability of type argument 'YamlDotNet.Core.Events.Scalar?' doesn't match constraint type 'YamlDotNet.Core.Events.ParsingEvent'.
|
🧪 Test extension (macos-latest):
src/PSRule/Converters/Json/LanguageExpressionJsonConverter.cs#L175
Possible null reference argument for parameter 'item' in 'void List<object>.Add(object item)'.
|
🧪 Test extension (macos-latest):
src/PSRule/Runtime/Binding/TargetBindingContext.cs#L44
Dereference of a possibly null reference.
|
🧪 Test extension (macos-latest):
src/PSRule/Runtime/Binding/TargetBindingContext.cs#L46
Dereference of a possibly null reference.
|
🧪 Test extension (macos-latest):
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L73
Possible null reference argument for parameter 'expression' in 'LanguageExpressionOuterFn LanguageExpressionBuilder.Expression(string path, LanguageExpression expression)'.
|
🧪 Test extension (macos-latest):
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L73
Possible null reference argument for parameter 'with' in 'LanguageExpressionOuterFn LanguageExpressionBuilder.Precondition(LanguageExpressionOuterFn expression, string[] with, string[] type, LanguageExpressionOuterFn when, string[] rule)'.
|
🧪 Test extension (macos-latest):
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L73
Possible null reference argument for parameter 'type' in 'LanguageExpressionOuterFn LanguageExpressionBuilder.Precondition(LanguageExpressionOuterFn expression, string[] with, string[] type, LanguageExpressionOuterFn when, string[] rule)'.
|
🧪 Test extension (macos-latest):
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L73
Possible null reference argument for parameter 'rule' in 'LanguageExpressionOuterFn LanguageExpressionBuilder.Precondition(LanguageExpressionOuterFn expression, string[] with, string[] type, LanguageExpressionOuterFn when, string[] rule)'.
|
🔍 Analyze with CodeQL
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Build module
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Build module:
src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs#L22
Nullability of reference types in return type of 'IPipelineWriter? ResourceCacheDiscoveryContext.Writer.get' doesn't match implicitly implemented member 'IPipelineWriter IResourceDiscoveryContext.Writer.get' (possibly because of nullability attributes).
|
Build module:
src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs#L191
The type 'YamlDotNet.Core.Events.Scalar?' cannot be used as type parameter 'T' in the generic type or method 'ParserExtensions.TryConsume<T>(IParser, out T)'. Nullability of type argument 'YamlDotNet.Core.Events.Scalar?' doesn't match constraint type 'YamlDotNet.Core.Events.ParsingEvent'.
|
Build module:
src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs#L210
The type 'YamlDotNet.Core.Events.Scalar?' cannot be used as type parameter 'T' in the generic type or method 'ParserExtensions.TryConsume<T>(IParser, out T)'. Nullability of type argument 'YamlDotNet.Core.Events.Scalar?' doesn't match constraint type 'YamlDotNet.Core.Events.ParsingEvent'.
|
Build module:
src/PSRule/Converters/Json/LanguageExpressionJsonConverter.cs#L175
Possible null reference argument for parameter 'item' in 'void List<object>.Add(object item)'.
|
Build module:
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L73
Possible null reference argument for parameter 'expression' in 'LanguageExpressionOuterFn LanguageExpressionBuilder.Expression(string path, LanguageExpression expression)'.
|
Build module:
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L73
Possible null reference argument for parameter 'with' in 'LanguageExpressionOuterFn LanguageExpressionBuilder.Precondition(LanguageExpressionOuterFn expression, string[] with, string[] type, LanguageExpressionOuterFn when, string[] rule)'.
|
Build module:
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L73
Possible null reference argument for parameter 'type' in 'LanguageExpressionOuterFn LanguageExpressionBuilder.Precondition(LanguageExpressionOuterFn expression, string[] with, string[] type, LanguageExpressionOuterFn when, string[] rule)'.
|
Build module:
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L73
Possible null reference argument for parameter 'rule' in 'LanguageExpressionOuterFn LanguageExpressionBuilder.Precondition(LanguageExpressionOuterFn expression, string[] with, string[] type, LanguageExpressionOuterFn when, string[] rule)'.
|
Build module:
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L162
Possible null reference return.
|
Build module:
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L270
Nullable value type may be null.
|
🧪 Test extension (windows-latest):
src/PSRule/Pipeline/ResourceCacheDiscoveryContext.cs#L22
Nullability of reference types in return type of 'IPipelineWriter? ResourceCacheDiscoveryContext.Writer.get' doesn't match implicitly implemented member 'IPipelineWriter IResourceDiscoveryContext.Writer.get' (possibly because of nullability attributes).
|
🧪 Test extension (windows-latest):
src/PSRule/Converters/Json/LanguageExpressionJsonConverter.cs#L175
Possible null reference argument for parameter 'item' in 'void List<object>.Add(object item)'.
|
🧪 Test extension (windows-latest):
src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs#L191
The type 'YamlDotNet.Core.Events.Scalar?' cannot be used as type parameter 'T' in the generic type or method 'ParserExtensions.TryConsume<T>(IParser, out T)'. Nullability of type argument 'YamlDotNet.Core.Events.Scalar?' doesn't match constraint type 'YamlDotNet.Core.Events.ParsingEvent'.
|
🧪 Test extension (windows-latest):
src/PSRule/Converters/Yaml/LanguageExpressionDeserializer.cs#L210
The type 'YamlDotNet.Core.Events.Scalar?' cannot be used as type parameter 'T' in the generic type or method 'ParserExtensions.TryConsume<T>(IParser, out T)'. Nullability of type argument 'YamlDotNet.Core.Events.Scalar?' doesn't match constraint type 'YamlDotNet.Core.Events.ParsingEvent'.
|
🧪 Test extension (windows-latest):
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L73
Possible null reference argument for parameter 'expression' in 'LanguageExpressionOuterFn LanguageExpressionBuilder.Expression(string path, LanguageExpression expression)'.
|
🧪 Test extension (windows-latest):
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L73
Possible null reference argument for parameter 'with' in 'LanguageExpressionOuterFn LanguageExpressionBuilder.Precondition(LanguageExpressionOuterFn expression, string[] with, string[] type, LanguageExpressionOuterFn when, string[] rule)'.
|
🧪 Test extension (windows-latest):
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L73
Possible null reference argument for parameter 'type' in 'LanguageExpressionOuterFn LanguageExpressionBuilder.Precondition(LanguageExpressionOuterFn expression, string[] with, string[] type, LanguageExpressionOuterFn when, string[] rule)'.
|
🧪 Test extension (windows-latest):
src/PSRule/Definitions/Expressions/LanguageExpressionBuilder.cs#L73
Possible null reference argument for parameter 'rule' in 'LanguageExpressionOuterFn LanguageExpressionBuilder.Precondition(LanguageExpressionOuterFn expression, string[] with, string[] type, LanguageExpressionOuterFn when, string[] rule)'.
|
🧪 Test extension (windows-latest):
src/PSRule/Runtime/Binding/TargetBindingContext.cs#L44
Dereference of a possibly null reference.
|
🧪 Test extension (windows-latest):
src/PSRule/Runtime/Binding/TargetBindingContext.cs#L46
Dereference of a possibly null reference.
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
CodeQL-Sarif
Expired
|
65 KB |
|
DevSkim-Sarif
Expired
|
2.66 KB |
|
Extension
|
25.7 MB |
|
PSRule-Sarif
Expired
|
698 Bytes |
|
Results-PSRule
|
9.18 KB |
|