Skip to content

Conversation

@cgrindel
Copy link
Owner

Summary

Add support for Standard Ruby (standardrb) as a Ruby linter alongside RuboCop. This implementation follows the same pattern as the RuboCop integration with full support for linting, auto-fixing, and SARIF report generation.

Standard Ruby is a zero-configuration Ruby linter and formatter based on RuboCop that provides stricter defaults and enforces a consistent style guide.

Implementation

Key Changes

  • Add lint/standardrb.bzl with lint_standardrb_aspect for Ruby linting
  • Update example configuration with standardrb gem dependency (v1.51.1)
  • Add .standard.yml configuration file for the example project
  • Integrate standardrb into the example tooling and test suite
  • Add test expectations for Standard Ruby linting violations
  • Update README.md to document Standard Ruby support
  • Pin gem versions in MODULE.bazel and WORKSPACE.bazel for reproducible builds

Implementation Details

  • Follows the established RuboCop linter pattern for consistency
  • Supports both human-readable and machine-readable (JSON/SARIF) output
  • Includes auto-correction/fix functionality
  • Honors exclusion patterns from .standard.yml configuration
  • Proper caching configuration with Bazel integration

Blocked by aspect-build#643.

cgrindel and others added 3 commits November 5, 2025 12:09
Add support for Standard Ruby (standardrb) as a Ruby linter alongside RuboCop.
This implementation follows the same pattern as the RuboCop integration with
full support for linting, auto-fixing, and SARIF report generation.

Key changes:
- Add lint/standardrb.bzl with lint_standardrb_aspect for Ruby linting
- Update example configuration with standardrb gem dependency (v1.51.1)
- Add .standard.yml configuration file for the example project
- Integrate standardrb into the example tooling and test suite
- Add test expectations for Standard Ruby linting violations
- Update README.md to document Standard Ruby support
- Pin gem versions in MODULE.bazel and WORKSPACE.bazel for reproducible builds

Standard Ruby is a zero-configuration Ruby linter and formatter based on RuboCop.
It provides stricter defaults and enforces a consistent style guide.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
Address code review findings:
- Add --force-exclusion flag in standardrb_action() to honor exclusions
  from .standard.yml even when explicit files are passed
- Add --force-exclusion flag in JSON output action for consistency
- Update Gemfile to use ~> version constraint for standard gem
  to match RuboCop pattern and prevent breaking changes

This ensures Standard Ruby respects exclusion patterns defined in
configuration files, matching the behavior of the RuboCop implementation.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@cgrindel cgrindel changed the base branch from add_rubocop to main November 5, 2025 19:10
@cgrindel
Copy link
Owner Author

cgrindel commented Nov 5, 2025

Replaced by aspect-build#652.

@cgrindel cgrindel closed this Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants