2023-11-10 14:57:40 +00:00
|
|
|
crystal_doc_search_index_callback({"repository_name":"ameba","body":"<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/veelenga/bin/master/ameba/logo.png\" width=\"800\">\n <h3 align=\"center\">Ameba</h3>\n <p align=\"center\">Code style linter for Crystal<p>\n <p align=\"center\">\n <sup>\n <i>(a single-celled animal that catches food and moves about by extending fingerlike projections of protoplasm)</i>\n </sup>\n </p>\n <p align=\"center\">\n <a href=\"https://github.com/crystal-ameba/ameba/actions?query=workflow%3ACI\"><img src=\"https://github.com/crystal-ameba/ameba/workflows/CI/badge.svg\"></a>\n <a href=\"https://github.com/crystal-ameba/ameba/releases\"><img src=\"https://img.shields.io/github/release/crystal-ameba/ameba.svg?maxAge=360\"></a>\n <a href=\"https://github.com/crystal-ameba/ameba/blob/master/LICENSE\"><img src=\"https://img.shields.io/github/license/crystal-ameba/ameba.svg\"></a>\n </p>\n</p>\n\n- [About](#about)\n- [Usage](#usage)\n - [Watch a tutorial](#watch-a-tutorial)\n - [Autocorrection](#autocorrection)\n - [Explain issues](#explain-issues)\n - [Run in parallel](#run-in-parallel)\n- [Installation](#installation)\n - [As a project dependency:](#as-a-project-dependency)\n - [OS X](#os-x)\n - [Docker](#docker)\n - [From sources](#from-sources)\n- [Configuration](#configuration)\n - [Sources](#sources)\n - [Rules](#rules)\n - [Inline disabling](#inline-disabling)\n- [Editors \\& integrations](#editors--integrations)\n- [Credits \\& inspirations](#credits--inspirations)\n- [Contributors](#contributors)\n\n## About\n\nAmeba is a static code analysis tool for the Crystal language.\nIt enforces a consistent [Crystal code style](https://crystal-lang.org/reference/conventions/coding_style.html),\nalso catches code smells and wrong code constructions.\n\nSee also [Roadmap](https://github.com/crystal-ameba/ameba/wiki).\n\n## Usage\n\nRun `ameba` binary within your project directory to catch code issues:\n\n```sh\n$ ameba\nInspecting 107 files\n\n...............F.....................FF....................................................................\n\nsrc/ameba/formatter/flycheck_formatter.cr:6:37\n[W] Lint/UnusedArgument: Unused argument `location`. If it's necessary, use `_` as an argument name to indicate that it won't be used.\n> source.issues.each do |issue, location|\n ^\n\nsrc/ameba/formatter/base_formatter.cr:16:14\n[W] Lint/UselessAssign: Useless assignment to variable `s`\n> return s += issues.size\n ^\n\nsrc/ameba/formatter/base_formatter.cr:16:7 [Correctable]\n[C] Style/RedundantReturn: Redundant `return` detected\n> return s += issues.size\n ^---------------------^\n\nFinished in 389.45 milliseconds\n107 inspected, 3 failures\n```\n\n### Watch a tutorial\n\n<a href=\"https://luckycasts.com/videos/ameba\"><img src=\"https://i.imgur.com/uOETQlM.png\" title=\"Write Better Crystal Code with the Ameba Shard\" width=\"500\" /></a>\n\n[🎬 Watch the LuckyCast showing how to use Ameba](https://luckycasts.com/videos/ameba)\n\n### Autocorrection\n\nRules that are marked as `[Correctable]` in the output can be automatically corrected using `--fix` flag:\n\n```sh\n$ ameba --fix\n```\n\n### Explain issues\n\nAmeba allows you to dig deeper into an issue, by showing you details about the issue\nand the reasoning by it being reported.\n\nTo be convenient, you can just copy-paste the `PATH:line:column` string from the\nreport and paste behind the `ameba` command to check it out.\n\n```sh\n$ ameba crystal/command/format.cr:26:83 # show explanation for the issue\n$ ameba --explain crystal/command/format.cr:26:83 # same thing\n```\n\n### Run in parallel\n\nSome quick benchmark results measured while running Ameba on Crystal repo:\n\n```sh\n$ CRYSTAL_WORKERS=1 ameba #=> 29.11 seconds\n$ CRYSTAL_WORKERS=2 ameba #=> 19.49 seconds\n$ CRYSTAL_WORKERS=4 ameba #=> 13.48 seconds\n$ CRYSTAL_WORKERS=8 ameba #=> 10.14 seconds\n```\n\n## Installation\n\n### As a project dependency:\n\nAdd this to your application'
|