ruff in a mcp-server 👉 mcp-server-analyzer #19639
Anselmoo
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone 👋👋,
I have integrated
into a FastMCP, and I called it just mcp-server-analyzer or via PyPi
This integration was motivated by my personal observation that GitHub Copilot sometimes struggles when switching between the chat window and the terminal. Therefore, I tried to trigger ruff directly.
Example
Example of running
ruff-check
Input:
Results:
I'll run the RUFF check on the bad_code.py file to get a comprehensive analysis of all the linting issues. Excellent! RUFF detected 38 issues with 18 fixable ones. Here's a comprehensive analysis of all the RUFF linting issues found in the bad_code.py file:
🔍 RUFF Static Code Analysis - Complete Report
📊 Summary Statistics:
📈 Detailed Breakdown by Rule Category:
🚫 Import Issues (F401, I001, UP035, N817) - 20 issues:
F401 - Unused Imports (16 errors - all fixable):
I001 - Import Formatting (1 info - fixable):
UP035 - Deprecated Types (2 info - not fixable):
N817 - Import Naming (1 warning - not fixable):
🏷️ Naming Convention Issues (N801) - 1 issue:
🔧 Code Quality Issues (F841, E711, E722, SIM102, SIM115, RET504) - 11 issues:
F841 - Unused Variables (3 errors - not fixable):
E711 - None Comparisons (2 warnings - not fixable):
E722 - Bare Except (1 warning - not fixable):
SIM102 - Nested If Statements (2 info - not fixable):
SIM115 - Context Manager (1 info - not fixable):
RET504 - Unnecessary Assignment (2 info - not fixable):
🔄 Function/Global Issues (PLW0602, ARG001) - 3 issues:
PLW0602 - Unused Global (2 info - not fixable):
ARG001 - Unused Argument (1 warning - not fixable):
🖨️ Code Style Issues (T201, PIE790, W292) - 3 issues:
T201 - Print Statements (2 info - not fixable):
PIE790 - Unnecessary Pass (1 info - fixable):
W292 - Missing Newline (1 warning - fixable):
🎯 Rule Categories Summary:
🚀 Priority Fix Recommendations:
🔥 High Priority (Errors - 17 issues):
Beta Was this translation helpful? Give feedback.
All reactions