A Best Practices Checker for Ballerina

Enhance your Ballerina code quality with real-time linting, diagnostics, and quick fixes.

Ballerina Lint in action

Key Features

Best Practices Checking

Automatically analyzes your Ballerina code against established best practices.

Real-time Diagnostics

Provides immediate feedback as you code with detailed explanations.

Quick Fixes

Offers suggestions for resolving identified issues with one-click fixes.

Customizable Rules

Configure which best practices to enforce and their severity levels.

Sidebar Integration

Explore all diagnostics in a dedicated sidebar view for better overview.

Language Support

Specialized support for Ballerina's unique language features and paradigms.

Supported Best Practices

Error Handling

  • Ensure errors are properly handled and not ignored
  • Check for appropriate error propagation
  • Validate error handling patterns

Memory Management

  • Identify potential memory leaks
  • Suggest optimizations for resource-intensive operations
  • Ensure proper resource cleanup

API Design

  • Check for consistent API naming conventions
  • Ensure proper documentation of public APIs
  • Validate parameter and return type usage

Concurrency

  • Detect common concurrency pitfalls
  • Suggest improvements for concurrent code
  • Check for race conditions and deadlocks

Security

  • Identify potential security vulnerabilities
  • Enforce secure coding patterns
  • Check for hardcoded credentials

Performance

  • Suggest more efficient code alternatives
  • Highlight performance bottlenecks
  • Identify unnecessary computations

Installation Guide

Install from VS Code Marketplace

The recommended way to install Ballerina Lint:

1

Open VS Code

Launch Visual Studio Code on your computer.

2

Open Extensions View

Press Ctrl+Shift+X (Windows/Linux) or ⌘+Shift+X (macOS)

3

Search and Install

Search for "Ballerina Lint" and click Install

Manual Installation (VSIX)

Alternative method using VSIX package:

1

Download VSIX Package

Get the latest VSIX package from the GitHub releases page.

2

Open VS Code

Launch Visual Studio Code on your computer.

3

Go to Extensions View

Press Ctrl+Shift+X or click on the Extensions icon in the Activity Bar.

4

Install from VSIX

Click on the "..." menu (top-right of the Extensions view) and select "Install from VSIX..."

5

Select the Download

Navigate to and select the downloaded ballerina-lint-1.0.0.vsix file.

6

Restart VS Code

Restart VS Code when prompted to activate the extension.

Requirements

  • Visual Studio Code: 1.80.0 or newer
  • Ballerina: 2.0.0 or newer recommended

Screenshots

Editor View

Issue Detection in Editor

The extension highlights issues directly in your editor with detailed explanations.

Diagnostics Panel

Diagnostics Panel

View all issues in one place with the dedicated diagnostics panel.

Quick Fixes

Quick Fixes

Suggested fixes are available with a single click.

Settings

Settings Configuration

Customize which rules to apply and their severity levels.

Ready to Improve Your Ballerina Code?

Get started with Ballerina Lint today and write better, cleaner, and more maintainable code.

Download Now