lint

Lint Ruby and ERB files with standardrb, erblint, and brakeman.

Updated Jun 28, 2022
One-click install
npx skills add https://github.com/pcasaretto/nix-home --skill lint-pcasaretto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lint
Source: https://github.com/pcasaretto/nix-home/tree/main/home-manager/modules/common/pi/compound-engineering/skills/lint
Command: npx skills add https://github.com/pcasaretto/nix-home --skill lint-pcasaretto

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires standardrb, erblint, brakeman, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of checking and fixing code quality issues in Ruby and ERB files, ensuring code adheres to standards and is free of common vulnerabilities before committing.

Core Features & Use Cases

  • Ruby Linting: Checks and auto-fixes Ruby code using standardrb.
  • ERB Linting: Checks and auto-fixes ERB templates using erblint.
  • Security Scanning: Identifies potential vulnerabilities using brakeman.
  • Use Case: Before pushing your latest feature branch, run this skill to automatically catch and fix style violations and security flaws in your Ruby on Rails application.

Quick Start

Run the lint skill to check and fix all Ruby and ERB files in the current directory.

Frequently Asked Questions about lint

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run automated linting and security scanning on Ruby and ERB files?

To run automated linting and security scanning on Ruby and ERB files, execute the lint skill in your current directory. It automatically checks and fixes code quality issues using standardrb, erblint, and brakeman.

What is the best way to enforce code quality standards in a Ruby on Rails application before committing?

The best way to enforce code quality standards before committing is to run this lint skill. It automates checking and fixing style violations and security flaws in Ruby and ERB files, ensuring pre-commit code hygiene.

Does this linting skill identify security vulnerabilities or just check formatting?

This linting skill identifies security vulnerabilities in addition to checking formatting. It uses brakeman to perform security scanning and identify potential risks, while standardrb and erblint handle style and formatting checks.

Do I need to install standardrb, erblint, and brakeman separately to check Ruby code?

Yes, you need standardrb, erblint, and brakeman installed to check Ruby code. The skill requires these dependencies to enforce coding standards, lint ERB templates, and perform security vulnerability scanning.

Can I automatically fix style violations in ERB templates?

Yes, you can automatically fix style violations in ERB templates. The skill uses erblint to check and auto-fix ERB templates, ensuring your views adhere to established coding standards before you commit changes.

Why should I run code quality checks before pushing a feature branch?

You should run code quality checks before pushing a feature branch to catch and fix style violations and security flaws early. This automated pre-commit hygiene step ensures your Ruby on Rails code adheres to standards and is free of vulnerabilities.