An open API service indexing awesome lists of open source software.

https://github.com/pattobrien/sidecar

A collection of packages providing you with more control over your IDE and developer experience.
https://github.com/pattobrien/sidecar

analyzer dart flutter lints

Last synced: 6 months ago
JSON representation

A collection of packages providing you with more control over your IDE and developer experience.

Awesome Lists containing this project

README

        

# Sidecar Analyzer

Enable a more personalized developer experience within the IDE.

A screenshot of a Sidecar lint popup in an IDE

Build Status
codecov
License: MIT
[![pub package](https://img.shields.io/pub/v/sidecar.svg)](https://pub.dev/packages/sidecar)

> Visit the [official documentation site](https://sidecaranalyzer.dev) for work-in-progress tutorials and explanations of core concepts

> This is an experimental package which is expected to change slightly until an official 0.1.0 release. However, the core architecture of Sidecar has been designed around the Dart-official ```package:analyzer``` APIs, and therefore any rule packages you may want to experiment with will be easy to port over to any future APIs

## Overview

- [Motivation](#motivation)
- [Features](#features)
- [CLI Installation](#cli-installation)
- [Usage](#usage)
- [Creating a Rule](#create-a-rule)
- [Using a rule in your Codebase](#using-a-rule)
- [Example Sidecar Rule Packages](#example-packages)
- [Troubleshooting](#troubleshooting)
- [Contributing](#contributing)

## Motivation

Dart lints are incredibly useful for keeping a codebase clean and tidy, but code analysis use cases don't need to end at official rules. What if we could use these same tools to enforce highly-opinionated rules for a particular package ecosystem (BloC vs Riverpod) or for a particular app?

The goal of Sidecar is to enable a more personalized developer experience by allowing quick and easy access to the core lint and code assist tools of modern IDEs.

## Features

| Lint Rules | IDE | CLI | Debug |
| ---------- | --- | --- | ----- |
| Lint messages | ✅ | ✅ | ✅ |
| Define a default severity | ✅ | ✅ | ✅ |
| Apply Quick Fix suggestions | ✅ | 🚧 | 🚧 |
| (IDE) URL links to rule documentation | ✅ | 🚫 | 🚫 |
| (CLI) Alternate output formats | 🚫 | 🚧 | |
| Ignore statements | | | |

| CodeEdit Rules | IDE | CLI | Debug |
| ----------------- | --- | --- | ----- |
| QuickAssist rules | 🚧 |
| Refactorings (rename, extract, etc.) | |
| Code Completion | | | |

| Rule Configuration (sidecar.yaml) | IDE | CLI | Debug |
| ------------- | ------ | ------ | ------ |
| Explicitly Enable/Disable rules | ✅ |
| (Lints) Override default severity | ✅ |
| Rule-level include/exclude globs | 🚧 |
| Package-level include/exclude globs | 🚧 |
| Project-level include/exclude globs | 🚧 |
| Customizable rule configurations | |
| Multi-import inheritance | |

| | MacOS | Linux | Windows |
| ---------- | ----- | ----- | ------- |
| Environment Support | ✅ | ✅ | ✅ |

## Usage

See the below guides for information on how to create and use Sidecar packages.

- [Core Concepts](https://sidecaranalyzer.dev/docs/category/core-concepts)
- [Using Sidecar rules to analyze a Codebase](https://sidecaranalyzer.dev/docs/category/usage-guides)

## Example Sidecar Rule Packages

To explore how rule packages are created or to use them to work on your codebase, take a look at the following rule packages:

- [design_system_lints](https://pub.dev/packages/design_system_lints)
- [dart_lints](https://pub.dev/packages/dart_lints) - Sidecar port of the official Dart lints, for benchmarking purposes

## Installing the CLI tool

Some Sidecar tasks are easier with the CLI tool. To install the CLI, simply run:

```sh
dart pub global activate sidecar
```

## Troubleshooting

- [Troubleshooting Tips](https://sidecaranalyzer.dev/docs/usage/troubleshooting)

## Contributing

Suggestions or feature requests would be highly appreciated at this point in the development process, so that as many development use cases can be accounted for as possible. It's encouraged to reach out or open a Github issue against the Sidecar repository.