Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## [1.2.0] - 2026-03-11

### Changed

- Default `--format file` output now shows human-readable explanation with config key in brackets:
`L73 Hash#fetch with second argument is slower than Hash#fetch with block [fetch_with_argument_vs_block]`
- Performance: use `HashSet` instead of `Vec` for file exclusion lookup (O(1) vs O(n))

### Internal

- Test coverage increased from 61.87% to 93.10% (242 tests)
- Upgrade GitHub Actions to Node.js 24 compatible versions (checkout@v6, upload-artifact@v7, download-artifact@v8)

## [1.1.1] - 2026-03-11

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rubyfast"
version = "1.1.1"
version = "1.2.0"
edition = "2021"
description = "A Ruby performance linter rewritten in Rust — detects 19 common anti-patterns, ~100x faster than the original fasterer gem"
license = "MIT"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ Groups offenses by file path — compact and easy to scan:

```
app/controllers/concerns/lottery_common.rb
L13 fetch_with_argument_vs_block
L94 fetch_with_argument_vs_block
L13 Hash#fetch with second argument is slower than Hash#fetch with block [fetch_with_argument_vs_block]
L94 Hash#fetch with second argument is slower than Hash#fetch with block [fetch_with_argument_vs_block]

app/controllers/api/v1/health_articles_controller.rb
L11 fetch_with_argument_vs_block
L11 Hash#fetch with second argument is slower than Hash#fetch with block [fetch_with_argument_vs_block]
```

### `--format rule`
Expand Down
9 changes: 5 additions & 4 deletions src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ pub fn print_results(result: &TraversalResult, format: &OutputFormat) {
///
/// ```text
/// app/controllers/concerns/lottery_common.rb
/// L13 fetch_with_argument_vs_block
/// L94 fetch_with_argument_vs_block
/// L13 Hash#fetch with second argument is slower than Hash#fetch with block [fetch_with_argument_vs_block]
/// L94 Hash#fetch with second argument is slower than Hash#fetch with block [fetch_with_argument_vs_block]
/// ```
fn print_results_by_file(result: &TraversalResult) {
for analysis in &result.results {
Expand All @@ -37,9 +37,10 @@ fn print_results_by_file(result: &TraversalResult) {
println!("{}", analysis.path.bold());
for offense in &analysis.offenses {
println!(
" {} {}",
" {} {} [{}]",
format!("L{}", offense.line).cyan(),
offense.kind.config_key()
offense.kind.explanation(),
offense.kind.config_key().dimmed()
);
}
println!();
Expand Down
Loading