C-SyntaxChecker is a tool designed to analyze C and C++ code for common syntax issues. It checks for bracket matching, keyword usage, function definitions, and more. This tool can help developers maintain clean and error-free
GNU General Public License v3.0
2
stars
1
forks
source link
Enhance code analysis with cyclomatic complexity and malloc detection #3
This PR enhances the code analysis tool in the following ways:
Cyclomatic Complexity:
Added calculation of cyclomatic complexity for each function to assess code complexity.
malloc Detection: Updated check_builtin_functions function to include detection for malloc usage, ensuring comprehensive analysis of memory allocation calls.
Changes:
Implemented cyclomatic complexity calculation for functions. Enhanced check_builtin_functions to detect malloc calls and report their usage.
Updated documentation and comments for clarity and maintainability.
Testing:
Tested the cyclomatic complexity calculation on sample C/C++ code files to ensure accurate results. Verified the detection and reporting of malloc usage in various code scenarios.
Ensured that the tool produces correct outputs and maintains performance standards.
This PR enhances the code analysis tool in the following ways:
Cyclomatic Complexity: Added calculation of cyclomatic complexity for each function to assess code complexity.
malloc Detection: Updated check_builtin_functions function to include detection for malloc usage, ensuring comprehensive analysis of memory allocation calls.
Changes:
Implemented cyclomatic complexity calculation for functions. Enhanced check_builtin_functions to detect malloc calls and report their usage.
Updated documentation and comments for clarity and maintainability.
Testing:
Tested the cyclomatic complexity calculation on sample C/C++ code files to ensure accurate results. Verified the detection and reporting of malloc usage in various code scenarios.
Ensured that the tool produces correct outputs and maintains performance standards.