Repository navigation
feat: add console output options, sorting and debug summary - #12
Merged
Merged
Conversation
Print the Config/Cache header, the file count and a progress line on a terminal. Render one table per class or a single table, with the columns chosen by the show* settings, colored by their thresholds. Add --sort-by, --sort-order and --debug with per-stage timings and statistics.
Strip trailing zeros from weights, draw row separators only for tables with multi-line body cells, and share the terminal check between the init and analyse commands.
Write the progress line to the terminal itself, only when interactive, and clear it before warnings and failures. Count East Asian wide characters as two columns and combining marks as none when aligning tables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
analyseprintsConfig:andCache:header lines,Found N files. Starting analysis., and a progress line on stderr only when running on a terminal.Class:/File:, classes sorted by name) or a singleAll Methods (N total)table with a leading Class column (groupByClass).showDetailedCognitiveMetrics,showHalsteadComplexity,showCyclomaticComplexityandshowUnderstandability;showOnlyMethodsExceedingThresholdhides methods at or belowscoreThreshold.NO_COLORhonoured) from the score, Halstead and risk thresholds.--sort-by(all PHP fields plusunderstandability),--sort-order asc|descwith the PHP validation messages; the sorted order is passed on to the reports.--debugprints stage timings (config, discovery, analysis, sorting, output) and statistics (files found/analysed/failed, methods, cache hits/misses); the clock is injectable.TextTablenow pads cells by one space and ignores ANSI codes when measuring widths, so the churn table changes slightly too.docs/Configuration.mddescribe the console options; the "not yet applied" note is reduced tocustomReporters.ResultTableBuilder.columns().Test plan
./mvnw -B verifygreen (JaCoCo line 96.7%, branch 97.0%; PIT 636 of 638 mutations killed)NO_COLORremoves the colors