initial commit w/ not-ready changes
This commit is contained in:
Родитель
417231ebae
Коммит
2c8e22a109
|
@ -28,6 +28,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{54758F73-0
|
|||
ProjectSection(SolutionItems) = preProject
|
||||
docs\XAA1001.md = docs\XAA1001.md
|
||||
docs\XAA1002.md = docs\XAA1002.md
|
||||
docs\XIA1001.md = docs\XIA1001.md
|
||||
docs\XIA1002.md = docs\XIA1002.md
|
||||
docs\XIA1003.md = docs\XIA1003.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
# XIA1001
|
||||
|
||||
## Cause
|
||||
|
||||
Advice on how to use Apple APIs is available
|
||||
|
||||
## Rule description
|
||||
|
||||
Displays advice on how to use Apple APIs
|
||||
|
||||
## How to fix violations
|
||||
|
||||
This rule is purely informational and does not require a fix
|
||||
|
||||
## How to suppress violations
|
||||
|
||||
```csharp
|
||||
[SuppressMessage("Xamarin.CodeAnalysis.Apple", "XIA1001:AppleAdvice", Justification = "Reviewed.")]
|
||||
```
|
||||
|
||||
```csharp
|
||||
#pragma warning disable XIA1001 // Notifies you with advice on how to use Apple APIs
|
||||
#pragma warning restore XIA1001 // Notifies you with advice on how to use Apple APIs
|
||||
```
|
|
@ -0,0 +1,24 @@
|
|||
# XIA1002
|
||||
|
||||
## Cause
|
||||
|
||||
Using newer Apple APIs when targeting an older OS version
|
||||
|
||||
## Rule description
|
||||
|
||||
Notifies you if you are using newer Apple APIs when targeting an older OS version
|
||||
|
||||
## How to fix violations
|
||||
|
||||
To fix a violation of this rule, use Apple APIs that are available on the targeted OS version
|
||||
|
||||
## How to suppress violations
|
||||
|
||||
```csharp
|
||||
[SuppressMessage("Xamarin.CodeAnalysis.Apple", "XIA1002:AppleApiTooNew", Justification = "Reviewed.")]
|
||||
```
|
||||
|
||||
```csharp
|
||||
#pragma warning disable XIA1002 // Notifies you if you are using newer Apple APIs when targeting an older OS version
|
||||
#pragma warning restore XIA1002 // Notifies you if you are using newer Apple APIs when targeting an older OS version
|
||||
```
|
|
@ -0,0 +1,24 @@
|
|||
# XIA1003
|
||||
|
||||
## Cause
|
||||
|
||||
Using a deprecated, obsolete or unavailable Apple API
|
||||
|
||||
## Rule description
|
||||
|
||||
Notifies you when using a deprecated, obsolete or unavailable Apple API
|
||||
|
||||
## How to fix violations
|
||||
|
||||
To fix a violation of this rule, use the suggested Apple API instead
|
||||
|
||||
## How to suppress violations
|
||||
|
||||
```csharp
|
||||
[SuppressMessage("Xamarin.CodeAnalysis.Apple", "XIA1003:AppleApiDeprecatedObsoleteUnavailable", Justification = "Reviewed.")]
|
||||
```
|
||||
|
||||
```csharp
|
||||
#pragma warning disable XIA1003 // Notifies you when using a deprecated, obsolete or unavailable Apple API
|
||||
#pragma warning restore XIA1003 // Notifies you when using a deprecated, obsolete or unavailable Apple API
|
||||
```
|
|
@ -14,6 +14,10 @@ namespace Xamarin.CodeAnalysis.Apple
|
|||
public const string IntroducedDiagnosticId = "XIA1002";
|
||||
public const string DeprecatedDiagnosticId = "XIA1003";
|
||||
|
||||
const string AdviceHelpLink = "https://github.com/xamarin/CodeAnalysis/blob/master/docs/XIA1001.md";
|
||||
const string IntroducedHelpLink = "https://github.com/xamarin/CodeAnalysis/blob/master/docs/XIA1002.md";
|
||||
const string DeprecatedHelpLink = "https://github.com/xamarin/CodeAnalysis/blob/master/docs/XIA1003.md";
|
||||
|
||||
const string ConfigFileName = "Info.plist";
|
||||
const string Category = "Notifications";
|
||||
|
||||
|
@ -23,7 +27,8 @@ namespace Xamarin.CodeAnalysis.Apple
|
|||
"{0}",
|
||||
Category,
|
||||
DiagnosticSeverity.Info,
|
||||
true
|
||||
true,
|
||||
AdviceHelpLink
|
||||
);
|
||||
|
||||
static readonly DiagnosticDescriptor introducedRule = new DiagnosticDescriptor (
|
||||
|
@ -33,8 +38,9 @@ namespace Xamarin.CodeAnalysis.Apple
|
|||
Category,
|
||||
DiagnosticSeverity.Info,
|
||||
true,
|
||||
"This rule is comparing the versions of the API's introduced attribute and the minimum deployment target defined in the Info.plist."
|
||||
);
|
||||
"This rule is comparing the versions of the API's introduced attribute and the minimum deployment target defined in the Info.plist.",
|
||||
IntroducedHelpLink
|
||||
);
|
||||
|
||||
static readonly DiagnosticDescriptor deprecatedRule = new DiagnosticDescriptor (
|
||||
DeprecatedDiagnosticId,
|
||||
|
@ -42,8 +48,9 @@ namespace Xamarin.CodeAnalysis.Apple
|
|||
"{0}",
|
||||
Category,
|
||||
DiagnosticSeverity.Info,
|
||||
true
|
||||
);
|
||||
true,
|
||||
DeprecatedHelpLink
|
||||
);
|
||||
|
||||
static readonly ImmutableArray<OperationKind> operationKindsOfInterest = ImmutableArray.Create (
|
||||
OperationKind.EventReference,
|
||||
|
|
Загрузка…
Ссылка в новой задаче