Tags · Phauthentic/cognitive-code-analysis · GitHub
Skip to content

Tags: Phauthentic/cognitive-code-analysis

Tags

1.11.1

Toggle 1.11.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Adding Analysis Action and Fixes to the Configuration (#72)

* Enhance report generation with new CI formats and refactor Markdown handling

- Added support for new CI report formats: Checkstyle, JUnit, SARIF, GitLab Code Quality, and GitHub Actions.
- Improved HTML and Markdown report generation with a single table configuration option.
- Refactored MarkdownReport for better file handling and class section management, enhancing code readability and maintainability.
- Updated tests to validate new report formats and configurations.

* Update output files to include configuration and cache status

- Added configuration file paths and cache status to various output files for improved clarity and debugging.
- Updated output formats for all relevant test cases to reflect the new configuration and cache information.

* Refactor configuration management and update file references

- Replaced instances of `config.yml` with `phpcca.yaml` across the codebase to standardize configuration file usage.
- Introduced a new `phpcca.yaml` file containing cognitive metrics configuration settings.
- Updated README.md to reflect the new copyright format.
- Adjusted GitHub Actions workflow to utilize the new configuration file.

* Update configuration file references to phpcca.yaml

- Changed all instances of cca.yaml to phpcca.yaml across documentation and codebase for consistency.
- Updated README.md, CI-Integration.md, and Configuration.md to reflect the new configuration file name.
- Modified InitCommand and related tests to create and reference phpcca.yaml instead of cca.yaml.

* Update cognitive metrics configuration in phpcca.yaml

- Changed the setting for showOnlyMethodsExceedingThreshold from false to true to enhance cognitive metrics reporting.

* Refactor CognitiveMetricsCommandCoverageTest to use a centralized test configuration method

- Introduced a private method `withTestConfig` to streamline the execution of tests with a specified configuration file.
- Updated all test cases in `CognitiveMetricsCommandCoverageTest` to utilize the new method for improved readability and maintainability.

1.10.0

Toggle 1.10.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Support for custom Reporters (#61)

1.9.0

Toggle 1.9.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Refactoring Cyclomatic Complexity Calculation (#64)

1.8.0

Toggle 1.8.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix exclude files via config (#54)

* Update test coverage file path and clean up .gitignore
* Fix exclusion pattern merging in source file scanning

1.7.0

Toggle 1.7.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Calculate Churn with Code Coverage (#49)

1.6.0

Toggle 1.6.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Made it possible to pass multiple files and folders (#48)

This will allow it to check only certain files and folders. This is useful when you want to check only changed files and limits the time it takes to run this.

1.5.0

Toggle 1.5.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Increase analysis performance (#46)

* Optimizing the AST visitors

* Update .gitignore and phpbench.json for benchmark storage configuration

- Added benchmarks/storage/ and .phpbench/ to .gitignore
- Updated phpbench.json to include XML storage driver and path for benchmark results

* Refactor Parser class by removing unused traverseAbstractSyntaxTree method and adding type hint for class-string in clearStaticProperty method

* Enhance CognitiveMetrics and Parser classes to improve complexity metrics handling

- Updated CognitiveMetrics to handle both array and scalar inputs for cyclomatic complexity.
- Refactored Parser to integrate cyclomatic complexity and Halstead metrics into method metrics.
- Removed unused methods for cyclomatic complexity and Halstead metrics from Parser.
- Added a new method to calculate risk levels based on cyclomatic complexity.

* Refactor Parser and CombinedMetricsVisitor classes for improved readability and maintainability

- Changed the instantiation of ReflectionClass in Parser to use a direct import for clarity.
- Added suppress warnings annotations for unused parameters in beforeTraverse and afterTraverse methods of CombinedMetricsVisitor.

* Refactor cyclomatic complexity handling in CognitiveMetrics class

- Simplified the instantiation of CyclomaticMetrics to directly accept the complexity data, removing unnecessary conditional checks for array or scalar inputs.

1.4.0

Toggle 1.4.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Implementing the Sorting Feature (#42)

# New Features Added

* Sorting functionality with command-line options --sort-by and --sort-order
* 13 sortable fields: score, halstead, cyclomatic, class, method, lineCount, argCount, returnCount, variableCount, propertyCallCount, ifCount, ifNestingLevel, elseCount
* Sort orders: ascending (asc) and descending (desc) with asc as default
* Grouping by class via new groupByClass configuration option (default: true)
* Enhanced filtering with better handling of ignored items and method filtering

# New Classes and Components

# Configuration Changes
* Added groupByClass: true option to config.yml
* Updated ConfigFactory and ConfigLoader to support the new option
Enhanced CognitiveConfig class with groupByClass property