# Verifying Ruby changes

Files: `.rb`. Derived from 5 scanned source repositories and 66 review prompts on https://awesomereviewers.com. Page: https://awesomereviewers.com/verify/ruby/

How to use this: run every check under *Run on every change*. Then, for each section under *Add when the change touches* that describes your diff, run its checks too. Checks catch what a tool can find; then apply the listed review prompts for what tools miss (fetch each prompt's raw URL).

Usage is the share of scanned repositories in this language that run the tool. A missing tool means no scanned repository runs one the scanner recognises: fall back to the prompts.

## Run on every change

- **Formatting** — no tool detected in the sample. Catches: Layout drift that buries the real change in the diff.
- **Linting** — no tool detected in the sample. Catches: Bug-prone patterns, unused code and conventions the formatter does not cover.
- **Type checking** — no tool detected in the sample. Catches: Wrong types, unhandled null or None, call signatures broken across modules.
- **Unit and integration tests** — no tool detected in the sample. Catches: Behaviour regressions on the paths the tests exercise.

Review prompts (11 in total, most discussed first):

- [Use descriptive identifiers](https://awesomereviewers.com/raw/discourse-use-descriptive-identifiers.md) — discourse/discourse, Naming Conventions
- [Use descriptive specific names](https://awesomereviewers.com/raw/mastodon-use-descriptive-specific-names.md) — mastodon/mastodon, Naming Conventions
- [Self-documenting identifier names](https://awesomereviewers.com/raw/rails-self-documenting-identifier-names.md) — rails/rails, Naming Conventions
- [Extract and organize methods](https://awesomereviewers.com/raw/chef-extract-and-organize-methods.md) — chef/chef, Code Style
- [Consistent descriptive naming patterns](https://awesomereviewers.com/raw/chef-consistent-descriptive-naming-patterns.md) — chef/chef, Naming Conventions
- [Follow established naming patterns](https://awesomereviewers.com/raw/brew-follow-established-naming-patterns.md) — Homebrew/brew, Naming Conventions
- [Extract complex logic](https://awesomereviewers.com/raw/mastodon-extract-complex-logic.md) — mastodon/mastodon, Code Style
- [Prefer simpler expressions](https://awesomereviewers.com/raw/rails-prefer-simpler-expressions.md) — rails/rails, Code Style
- [Extract duplicate code](https://awesomereviewers.com/raw/discourse-extract-duplicate-code.md) — discourse/discourse, Code Style
- [Simplify complex code blocks](https://awesomereviewers.com/raw/brew-simplify-complex-code-blocks.md) — Homebrew/brew, Code Style
- [Follow established naming conventions](https://awesomereviewers.com/raw/react-native-follow-established-naming-conventions.md) — facebook/react-native, Naming Conventions

## Add when the change touches

### Authentication, input handling, secrets, permissions

- **Security scanning**: `codeql` (40% of repos). Runs via GitHub Action github/codeql-action/analyze. Docs: https://github.com/github/codeql
- **Secret scanning** — no tool detected in the sample. Catches: Credentials and tokens committed to the repository.
- **Dependency audit** — no tool detected in the sample. Catches: Known-vulnerable or disallowed dependencies and licenses.

Review prompts (5 in total, most discussed first):

- [verify authorization explicitly](https://awesomereviewers.com/raw/discourse-verify-authorization-explicitly.md) — discourse/discourse, Security
- [Secure credential management](https://awesomereviewers.com/raw/chef-secure-credential-management.md) — chef/chef, Security
- [Content security policy configuration](https://awesomereviewers.com/raw/rails-content-security-policy-configuration.md) — rails/rails, Security
- [Prevent injection vulnerabilities](https://awesomereviewers.com/raw/brew-prevent-injection-vulnerabilities.md) — Homebrew/brew, Security
- [Minimize HTML attack surface](https://awesomereviewers.com/raw/mastodon-minimize-html-attack-surface.md) — mastodon/mastodon, Security

### Public APIs, signatures, error paths, nullability

- **Type checking** — no tool detected in the sample. Catches: Wrong types, unhandled null or None, call signatures broken across modules.
- **Unit and integration tests** — no tool detected in the sample. Catches: Behaviour regressions on the paths the tests exercise.
- **Property-based tests** — no tool detected in the sample. Catches: Edge-case inputs nobody wrote a test for; invariants over generated data.

Review prompts (15 in total, most discussed first):

- [Prefer explicit nil handling](https://awesomereviewers.com/raw/brew-prefer-explicit-nil-handling.md) — Homebrew/brew, Null Handling
- [Fail gracefully always](https://awesomereviewers.com/raw/chef-fail-gracefully-always.md) — chef/chef, Error Handling
- [Standardize API integration patterns](https://awesomereviewers.com/raw/brew-standardize-api-integration-patterns.md) — Homebrew/brew, API
- [Minimize public API surface](https://awesomereviewers.com/raw/rails-minimize-public-api-surface.md) — rails/rails, API
- [Clear error recovery paths](https://awesomereviewers.com/raw/brew-clear-error-recovery-paths.md) — Homebrew/brew, Error Handling
- [early nil validation](https://awesomereviewers.com/raw/mastodon-early-nil-validation.md) — mastodon/mastodon, Null Handling
- [API parameter design](https://awesomereviewers.com/raw/mastodon-api-parameter-design.md) — mastodon/mastodon, API
- [Initialize nil-prone variables](https://awesomereviewers.com/raw/rails-initialize-nil-prone-variables.md) — rails/rails, Null Handling
- [Prefer guard clauses](https://awesomereviewers.com/raw/chef-prefer-guard-clauses.md) — chef/chef, Null Handling
- [API parameter clarity](https://awesomereviewers.com/raw/discourse-api-parameter-clarity.md) — discourse/discourse, API
- [Contextual error messages](https://awesomereviewers.com/raw/rails-contextual-error-messages.md) — rails/rails, Error Handling
- [Include contextual error information](https://awesomereviewers.com/raw/discourse-include-contextual-error-information.md) — discourse/discourse, Error Handling

### Service and framework code

- **Unit and integration tests** — no tool detected in the sample. Catches: Behaviour regressions on the paths the tests exercise.
- **Version and platform matrix**: `ci-matrix` (20% of repos). Command seen: `analyze (language: 3)`. Docs: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations

### Algorithms, parsers, data transforms

- **Property-based tests** — no tool detected in the sample. Catches: Edge-case inputs nobody wrote a test for; invariants over generated data.
- **Fuzzing** — no tool detected in the sample. Catches: Crashes, panics and hangs on malformed input, especially in parsers and decoders.
- **Mutation testing** — no tool detected in the sample. Catches: Tests that keep passing whatever the code does.
- **Proofs and specifications** — no tool detected in the sample. Catches: Design-level bugs in protocols and algorithms, checked against a specification.

Review prompts (5 in total, most discussed first):

- [Optimize collection operations](https://awesomereviewers.com/raw/brew-optimize-collection-operations.md) — Homebrew/brew, Algorithms
- [Choose semantic algorithms](https://awesomereviewers.com/raw/chef-choose-semantic-algorithms.md) — chef/chef, Algorithms
- [Efficient data processing](https://awesomereviewers.com/raw/rails-efficient-data-processing.md) — rails/rails, Algorithms
- [optimize collection iterations](https://awesomereviewers.com/raw/mastodon-optimize-collection-iterations.md) — mastodon/mastodon, Algorithms
- [optimize data structure choices](https://awesomereviewers.com/raw/discourse-optimize-data-structure-choices.md) — discourse/discourse, Algorithms

### Threads, async code, locks, shared state

- **Concurrency model checking** — no tool detected in the sample. Catches: Races and orderings that fail only under specific interleavings.
- **Undefined-behaviour detection** — no tool detected in the sample. Catches: Memory-safety and aliasing violations in unsafe code.
- **Property-based tests** — no tool detected in the sample. Catches: Edge-case inputs nobody wrote a test for; invariants over generated data.

### Network calls, retries, timeouts, protocols

- **Unit and integration tests** — no tool detected in the sample. Catches: Behaviour regressions on the paths the tests exercise.
- **Fuzzing** — no tool detected in the sample. Catches: Crashes, panics and hangs on malformed input, especially in parsers and decoders.

Review prompts (3 in total, most discussed first):

- [Secure network operations](https://awesomereviewers.com/raw/chef-secure-network-operations.md) — chef/chef, Networking
- [Use ASCII-only URLs](https://awesomereviewers.com/raw/brew-use-ascii-only-urls.md) — Homebrew/brew, Networking
- [Network resource limits](https://awesomereviewers.com/raw/mastodon-network-resource-limits.md) — mastodon/mastodon, Networking

### UI components and pages

- **End-to-end browser tests** — no tool detected in the sample. Catches: User flows broken across components, routing and the network.
- **Linting** — no tool detected in the sample. Catches: Bug-prone patterns, unused code and conventions the formatter does not cover.

### Databases, migrations, caching

- **Unit and integration tests** — no tool detected in the sample. Catches: Behaviour regressions on the paths the tests exercise.
- **Version and platform matrix**: `ci-matrix` (20% of repos). Command seen: `analyze (language: 3)`. Docs: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations

Review prompts (5 in total, most discussed first):

- [Database-specific query optimization](https://awesomereviewers.com/raw/rails-database-specific-query-optimization.md) — rails/rails, Database
- [validate migration data comprehensively](https://awesomereviewers.com/raw/discourse-validate-migration-data-comprehensively.md) — discourse/discourse, Migrations
- [Optimize database queries](https://awesomereviewers.com/raw/mastodon-optimize-database-queries.md) — mastodon/mastodon, Database
- [Avoid N+1 queries](https://awesomereviewers.com/raw/discourse-avoid-n1-queries.md) — discourse/discourse, Database
- [migration data dependencies](https://awesomereviewers.com/raw/mastodon-migration-data-dependencies.md) — mastodon/mastodon, Migrations

### Hot paths and performance

- No tool-based check applies; rely on the prompts.

Review prompts (5 in total, most discussed first):

- [Minimize unnecessary object allocations](https://awesomereviewers.com/raw/rails-minimize-unnecessary-object-allocations.md) — rails/rails, Performance Optimization
- [Minimize unnecessary operations](https://awesomereviewers.com/raw/brew-minimize-unnecessary-operations.md) — Homebrew/brew, Performance Optimization
- [Memoize expensive operations](https://awesomereviewers.com/raw/chef-memoize-expensive-operations.md) — chef/chef, Performance Optimization
- [batch similar operations](https://awesomereviewers.com/raw/mastodon-batch-similar-operations.md) — mastodon/mastodon, Performance Optimization
- [Cache expensive operations](https://awesomereviewers.com/raw/discourse-cache-expensive-operations.md) — discourse/discourse, Performance Optimization

### Model, prompt and LLM code

- **Unit and integration tests** — no tool detected in the sample. Catches: Behaviour regressions on the paths the tests exercise.

### Logging, metrics, tracing

- No tool-based check applies; rely on the prompts.

Review prompts (1 in total, most discussed first):

- [Include contextual log information](https://awesomereviewers.com/raw/discourse-include-contextual-log-information.md) — discourse/discourse, Logging

### CI workflows and configuration files

- **CI workflow linting** — no tool detected in the sample. Catches: Broken GitHub Actions syntax, script injection, over-broad token permissions.
- **File hygiene** — no tool detected in the sample. Catches: Invalid JSON, YAML or TOML, merge markers, trailing whitespace, oversized files.

Review prompts (7 in total, most discussed first):

- [centralize configuration management](https://awesomereviewers.com/raw/mastodon-centralize-configuration-management.md) — mastodon/mastodon, Configurations
- [Configure at proper scope](https://awesomereviewers.com/raw/rails-configure-at-proper-scope.md) — rails/rails, Configurations
- [Explicit configuration over implicit](https://awesomereviewers.com/raw/chef-explicit-configuration-over-implicit.md) — chef/chef, Configurations
- [Safe setting modifications](https://awesomereviewers.com/raw/discourse-safe-setting-modifications.md) — discourse/discourse, Configurations
- [Structured environment configuration](https://awesomereviewers.com/raw/brew-structured-environment-configuration.md) — Homebrew/brew, Configurations
- [Correct GitHub Actions annotations](https://awesomereviewers.com/raw/brew-correct-github-actions-annotations.md) — Homebrew/brew, CI/CD
- [Environment variable validation](https://awesomereviewers.com/raw/react-native-environment-variable-validation.md) — facebook/react-native, Configurations

### Dependencies and lockfiles

- **Dependency audit** — no tool detected in the sample. Catches: Known-vulnerable or disallowed dependencies and licenses.
- **Lockfile consistency** — no tool detected in the sample. Catches: A lockfile that no longer matches its manifest.
- **Version and platform matrix**: `ci-matrix` (20% of repos). Command seen: `analyze (language: 3)`. Docs: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations

### The tests themselves

- **Mutation testing** — no tool detected in the sample. Catches: Tests that keep passing whatever the code does.
- **Version and platform matrix**: `ci-matrix` (20% of repos). Command seen: `analyze (language: 3)`. Docs: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/run-job-variations

Review prompts (5 in total, most discussed first):

- [Organize tests for clarity](https://awesomereviewers.com/raw/rails-organize-tests-for-clarity.md) — rails/rails, Testing
- [optimize test fixtures](https://awesomereviewers.com/raw/discourse-optimize-test-fixtures.md) — discourse/discourse, Testing
- [optimize test organization](https://awesomereviewers.com/raw/mastodon-optimize-test-organization.md) — mastodon/mastodon, Testing
- [Use strict test doubles](https://awesomereviewers.com/raw/chef-use-strict-test-doubles.md) — chef/chef, Testing
- [Structure test fixtures clearly](https://awesomereviewers.com/raw/brew-structure-test-fixtures-clearly.md) — Homebrew/brew, Testing

### Documentation and comments

- **Docs build** — no tool detected in the sample. Catches: Broken cross-references, links and markup in documentation.
- **Spelling** — no tool detected in the sample. Catches: Typos in identifiers, comments and docs.

Review prompts (4 in total, most discussed first):

- [Document with examples](https://awesomereviewers.com/raw/chef-document-with-examples.md) — chef/chef, Documentation
- [Write complete API examples](https://awesomereviewers.com/raw/rails-write-complete-api-examples.md) — rails/rails, Documentation
- [Document non-obvious decisions](https://awesomereviewers.com/raw/brew-document-non-obvious-decisions.md) — Homebrew/brew, Documentation
- [Example documentation standards](https://awesomereviewers.com/raw/aws-sdk-js-example-documentation-standards.md) — aws/aws-sdk-js, Documentation

## Source repositories

[rails/rails](https://awesomereviewers.com/sources/rails-rails/), [mastodon/mastodon](https://awesomereviewers.com/sources/mastodon-mastodon/), [discourse/discourse](https://awesomereviewers.com/sources/discourse-discourse/), [Homebrew/brew](https://awesomereviewers.com/sources/homebrew-brew/), [chef/chef](https://awesomereviewers.com/sources/chef-chef/)
