CustomCode.Analyzer 0.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package CustomCode.Analyzer --version 0.1.1
                    
NuGet\Install-Package CustomCode.Analyzer -Version 0.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CustomCode.Analyzer" Version="0.1.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CustomCode.Analyzer" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="CustomCode.Analyzer">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CustomCode.Analyzer --version 0.1.1
                    
#r "nuget: CustomCode.Analyzer, 0.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CustomCode.Analyzer@0.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CustomCode.Analyzer&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=CustomCode.Analyzer&version=0.1.1
                    
Install as a Cake Tool

OutSystems Developer Cloud (ODC) Custom Code Analyzer

Coverage Lines of Code PRs Welcome

Reliability Rating Maintainability Rating Vulnerabilities

ℹ️ This component is unofficial and unsupported by OutSystems.

Overview

When you want to extend your ODC apps with custom C# code, you do so with the External Libraries SDK. This SDK allows you to write C# code that you can call from your ODC apps.

Although IntelliSense in your IDE guides the available SDK decorators and their syntax, it does not guide the rules you must follow (for example, on naming and design decisions). This guidance is provided when uploading your project's built assembly to the ODC Portal, where you get feedback on rule violations. Using this component brings that feedback forward and gives you real-time feedback on compliance with the rules as you write the code.

Technical Primer

When you upload your project's built assembly to the ODC Portal, it does not have access to the underlying code—the ODC Portal checks compliance with the rules using the assembly's metadata.

This extension, built from scratch, implements the rules using the rich code analysis APIs of Roslyn, the .NET compiler.

How to use

Visual Studio 2022 (Enterprise, Pro and Community editions)

You can use the auto-updating extension from the Visual Studio Marketplace. Simply install the extension from the Visual Studio Marketplace.

If your project references the External Libraries SDK (OutSystems.ExternalLibraries.SDK), the extension should automatically start providing feedback on your code.

Others

Add the NuGet package as a dev dependency to your ODC external libraries project:

dotnet add package CustomCode.Analyzer

If your project references the External Libraries SDK (OutSystems.ExternalLibraries.SDK), the component should automatically start providing feedback on your code.

💡 Auto-updating extensions for Visual Studio Code and Rider are in the works.

TODO

  • Marketplace extensions for Visual Studio Code and Rider.
  • Beyond the rules: info-level guidance for best practices (statelessness checks, guidance on large binary files).
  • Explore viability of implementing OS-ELG-MODL-05009
  • Explore CodeFixProvider for auto-fixable rules.

Contributing

Please report bugs and feature requests here.

PRs are welcome. Code quality improvements, features (especially those in the TODO list) and documentation improvements are all welcome 🤗 All changes to Analyzer code should pass all existing tests (dotnet test) and all new features should be comprehensively covered by new tests.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.1 204 2/23/2025
0.2.0 315 1/13/2025
0.1.4 105 1/9/2025
0.1.3 110 1/6/2025
0.1.2 146 1/4/2025
0.1.1 121 1/2/2025
0.1.0 151 12/31/2024