Loading...

CLI Overview

Quick Start Guide

wheels info

wheels reload

wheels deps

wheels destroy

wheels watch

wheels generate app

wheels generate app-wizard

wheels generate controller

wheels generate model

wheels generate view

wheels generate property

wheels generate route

wheels generate resource

wheels generate api-resource

wheels generate frontend

wheels generate test

wheels generate snippets

wheels scaffold

wheels test

wheels test run

wheels test coverage

wheels test debug

wheels config list

wheels config set

wheels config env

wheels env

wheels env setup

wheels env list

wheels env switch

wheels environment

wheels console

wheels runner

wheels server

wheels server start

wheels server stop

wheels server restart

wheels server status

wheels server log

wheels server open

wheels plugins

wheels plugins list

wheels plugins install

wheels plugins remove

wheels analyze

wheels analyze code

wheels analyze performance

wheels analyze security

wheels security

wheels security scan

wheels optimize

wheels optimize performance

wheels docs

wheels docs generate

wheels docs serve

wheels ci init

wheels docker init

wheels docker deploy

wheels deploy

wheels deploy audit

wheels deploy exec

wheels deploy hooks

wheels deploy init

wheels deploy lock

wheels deploy logs

wheels deploy proxy

wheels deploy push

wheels deploy rollback

wheels deploy secrets

wheels deploy setup

wheels deploy status

wheels deploy stop

Configuration Management

Creating Commands

Service Architecture

Migrations Guide

Testing Guide

Ask or search...
Ctrl K
Loading...

analyze code

This command works correctly without options (parameters). Option support is under development and will be available soon.

⚠️ Known Issues

  1. This command may not display real-time processing details.
  2. Options (parameters) are not yet fully functional.

Analyzes code quality in your Wheels application, checking for best practices, potential issues, and code standards compliance.

Usage

wheels analyze code [path] [--fix] [--format=<format>] [--severity=<severity>] [--report]

Parameters

  • path - (Optional) Path to analyze. Default: current directory (.)
  • --fix - (Optional) Attempt to fix issues automatically
  • --format - (Optional) Output format: console, json, junit. Default: console
  • --severity - (Optional) Minimum severity level: info, warning, error. Default: warning
  • --report - (Optional) Generate HTML report

Parameters are coming soon. Currently, this command works without parameters.

Description

The analyze code command performs comprehensive code quality analysis on your Wheels application. It checks for:

  • Code complexity and maintainability
  • Adherence to Wheels coding standards
  • Potential bugs and code smells
  • Duplicate code detection
  • Function length and complexity metrics
  • Variable naming conventions
  • Deprecated function usage

Examples

Basic code analysis

wheels analyze code

Analyze specific directory

wheels analyze code app/controllers

Auto-fix issues

wheels analyze code --fix

Generate HTML report

wheels analyze code --report

Analyze with JSON output for CI/CD

wheels analyze code --format=json

Check only errors (skip warnings)

wheels analyze code --severity=error

Analyze and fix specific path with report

wheels analyze code app/models --fix --report

Output

The command provides detailed feedback including:

  • Complexity Score: Cyclomatic complexity for functions
  • Code Standards: Violations of Wheels conventions
  • Duplicate Code: Similar code blocks that could be refactored
  • Suggestions: Recommendations for improvement
  • Metrics Summary: Overall code health indicators

Notes

  • Large codebases may take several minutes to analyze
  • The --fix flag will automatically fix issues where possible
  • HTML reports are saved to the reports/ directory with timestamps
  • Integration with CI/CD pipelines is supported via JSON and JUnit output formats
  • Use .wheelscheck config file for custom rules and configurations