コンテンツにスキップ

similarity-go

強力なAST解析でGoコードベース内の重複と類似のコードパターンを発見

similarity-goは、Go開発者がコードベース内の重複と類似のコードパターンを特定するのに役立つ強力なCLIツールです。GoのAbstract Syntax Tree(AST)解析を活用することで、単純なテキストマッチングを超えた正確で意味のある類似性検出を提供します。

🚀 高速解析

GoのネイティブAST解析による超高速コード解析

🎯 正確な検出

テキストの一致だけでなく、意味的類似性を検出する洗練されたアルゴリズム

⚙️ 設定可能

類似性しきい値と無視パターンをカスタマイズしてニーズに合わせて調整

📊 豊富な出力

JSON、YAML、人間が読みやすいレポートなど複数の出力形式

ブラウザで直接similarity-goを試してみましょう:

🚀 Interactive Demo

Experience similarity-go's AST analysis in real-time

Lines: 0
🤖
Click "Analyze Code" to see AST-based similarity analysis
💡

Demo Note: This is a simulated analysis for demonstration. The actual similarity-go CLI provides:

  • • Real AST parsing and structural analysis
  • • Support for entire Go projects and modules
  • • Advanced similarity algorithms with configurable thresholds
  • • JSON, YAML, and detailed console output formats

単純なテキストベースのツールとは異なり、similarity-goはGoのAbstract Syntax Treeを使用してコードの構造を解析します。これにより、変数名、コメント、フォーマットが異なっていても、機能的に類似したコードを検出できます。

検出感度をプロジェクトのニーズに合わせて微調整できます。異なるタイプの類似性に対して異なるしきい値を設定できます。

ワークフローに最適な形式で結果を取得:

  • 人間が読みやすいコンソール出力
  • プログラム処理用JSON
  • 設定管理用YAML
  • 人気のCI/CDシステムとの統合

大規模なコードベースでも、並列処理と効率的なメモリ使用によりスピードを重視して構築されています。

⚡ Performance Benchmarks

similarity-go performance across different codebase sizes

Benchmarked on: Intel i7-12700K, 32GB RAM, NVMe SSD

⏱️ Execution Time Analysis

🏃‍♂️
FAST
Small Project
~1,000 lines
0.15s
🚶‍♂️
GOOD
Medium Project
~10K lines
1.2s
🏃‍♀️
SOLID
Large Project
~100K lines
8.7s
🏢
SCALE
Enterprise
~1M lines
45s
💾
Memory Usage
~25MB
Peak Usage
Low Efficient & Scalable
⚡
CPU Utilization
80%
Efficiency
Multi-core optimized Parallel Processing
🎯
Accuracy
95%
Precision Rate
AST-based Analysis High Precision

🚀 Performance Features

What makes similarity-go fast and efficient

✅
Parallel Processing
Worker pools maximize CPU utilization across all cores
✅
Intelligent Caching
Smart caching system reduces redundant AST operations
✅
Memory Efficient
Optimized AST traversal with minimal memory footprint
✅
Enterprise Ready
Scales efficiently for large codebases and CI/CD pipelines

Goコードの類似性を見つける準備はできましたか?

  1. システムにsimilarity-goをインストール
  2. クイックスタートガイドに従って最初の解析を実行
  3. 高度な使用法についてはAPIリファレンスを探索