Releases: rw-core/rw-git
Releases · rw-core/rw-git
Release list
3.4.1
- Improvement: Add support for filtering analysis by target files and revision ranges.
- Improvement: SzzAlgorithm add targetFiles parameter to restrict fix-commit search to specific files via git pathspecs
- Improvement: MegaCommitsHeuristic add revisionRange parameter to restrict analysis to a specific revision range
- Improvement: SuspiciousCommitsHeuristic add revisionRange parameter to both findSuspiciousCommits and extractChangedComments methods
v3.4.0
- FEAT (Metrics): Added a shared
NestingResolverthat computes control-flow nesting depth per token in a single pass, with per-language strategies declared via a newBlockStructureonLanguageProfile: brace-delimited (control/lambda/neutral frame classification), indentation-based (indent/dedent synthesis from newline indent stamps, with bracket-continuation handling), and keyword-terminated (end/fi/done, with statement-position filtering of Ruby/Lua modifier forms). Exported vialexical_metrics.dart. See ADR-0018. - BREAKING (Metrics): Rewrote
CognitiveComplexityAlgorithmagainst the SonarSource specification on top of resolved depths. Function bodies, argument lists, and literals no longer count as nesting;else/elifscore a flat +1 withelse ifcollapsed to one increment;switchcounts once andcasearms do not; ternary?counts (disambiguated from nullable-type markers) and??scores +1; C preprocessor#ifis ignored. Python nesting is now visible (previously the metric degenerated to cyclomatic counting for indentation languages). Scores are not comparable with pre-3.4.0 values. - BREAKING (Metrics):
IndentationComplexityAlgorithmnow reports genuine control-flow nesting from the shared resolver instead of raw brace counting, and returns consistent keys (max_nesting_depth,average_nesting_depth) for empty input. - Improvement (Lexer):
FsmLexerstamps each newline token with the indentation width of the line it opens (Token.indentWidth; tabs expand to the next multiple of 8, blank/comment-only lines stamp -1), preserving the structural whitespace signal for indentation-based languages without emitting whitespace tokens. - FIX (Profiles): Removed dead
'?'/'??'entries fromcontrolFlowKeywords(they lex as operators and could never match identifier lookups); addedlambdaIntroducers(=>,->) and keyword-end block vocabularies to the default profiles. - BREAKING (Metrics): Rewrote
NpathComplexityAlgorithmto utilizeNestingResolverto accurately compute acyclic paths across depths using a stack-based model, correctly differentiating between multiplicative paths (sequential decisions) and additive paths (nested decisions). - FIX (Metrics):
AbcScoreAlgorithmnow correctly classifies function and method calls as Branches (B) via token lookahead, and control-flow/logical operators as Conditions (C), perfectly aligning with the Fitzpatrick (1997) ABC metric specification. - DOCS (ADRs): Updated ADR-0018 to confirm Cyclomatic Complexity deliberately excludes depth factors, and removed a forward-looking promise regarding future algorithm adoptions.
What's Changed
- Create agnostic-code-metrics.yml by @gbrandtio in #11
Full Changelog: v3.3.2...v3.4.0
v3.3.2
- Improvement: Move FsmLexer from hardcoded C-family comment/string masking to injected LexicalProfile objects, enabling language-specific accuracy without code forks. Simultaneously optimize the hot tokenization path to operate exclusively on code units (integers) instead of String indexing, eliminating per-character allocations.
- Improvement: Add LexicalProfile definitions for 10 languages (C, Python, Go, Ruby, Lua, Shell, XML, etc.), each with correct line-comment prefixes, block delimiters, and string syntax. Extend DefaultProfiles with new language support and file extensions, refactoring extension lookup to iterate through all profiles.
- Improvement: Improve number literal scanning to handle radix prefixes (0x, 0b, 0o), digit separators, decimals, and scientific notation as atomic tokens. Replace substring-based character tests with precomputed lookup tables.
Full Changelog: v3.3.1...v3.3.2
v3.3.1
- Feat (GitHub): Moved from @gbrandtio personal github, to @rw-core organisation in github.
- Feat (Distribution): Updated the npm package to reflect the new organisation name, along with pubspec assets and git jobs.
- CHORE (Distribution): Removed flutter dependency and pumped dart version to >=3.10.0 <4.0.0
Full Changelog: v3.3.0...v3.3.1
v3.3.0
3.3.0
- FEAT (Library): Exposed the pure lexical metrics algorithms (
FsmLexer,CyclomaticComplexityAlgorithm,HalsteadComplexityAlgorithm, etc.) vialexical_metrics.dartso 3rd party packages can build custom static analysis pipelines. - FEAT (Library): Added a new
LexicalMetricsRunnerfacade that allows 3rd party consumers to easily compute the full lexical complexity suite (McCabe, Maintainability Index, ABC Score, NPath, Cognitive, Halstead) synchronously for any given file and source string, without the overhead of Isolate spawning or git-churn sampling logic.
Full Changelog: v3.2.5...v3.3.0
v3.2.5
3.2.5
- Improvement (Quality): Removed duplication of context for hints/prompts/skills. Removed capped limits for hints in order to enhance quality of output.
Full Changelog: v3.2.4...v3.2.5
v3.2.4
- PERF (Quality): Drastically improved the execution time of intelligence tools across large Git repositories (e.g. >10,000 commits) by refactoring
ChurnHeuristicto usegit log --name-onlyinstead of the heavygit log -p. This eliminates huge amounts of text-parsing overhead. - BREAKING (Core/MCP): Removed
classChurnandblockChurnfromChurnMetricsDtoandChurnMetricsWithAuthorsDtoacross the codebase, as the granular tracking of functions and classes was removed to optimize analysis at the file level. Theanalyze_code_qualitytool now exclusively reportshigh_churn_files. - PERF (Quality): Introduced chunked concurrency in
SzzAlgorithm.execute(). The algorithm now groups fix-commits into batches (batch size of 10) to execute_traceIntroducingCommitsin parallel, significantly improving performance for deep histories by preventing excessive OS command spawning. - Improvement: Improving skills, prompts, hints in order to provide more details and guide the LLM better.
v3.2.3
- FIX (Core): Fixed an issue where
git diffandgit logcommands would crash on binary or unreadable files (e.g.,.docfiles) due to failingtextconvor external diff drivers. TheStandardProcessRunnernow universally injects--no-ext-diffand--no-textconvinto diff-generating Git commands to ensure Git gracefully reports binary differences and continues processing all files in the repository without terminating the command sequence.
Full Changelog: v3.2.2...v3.2.3
v3.2.2
3.2.2
- FIX (documentation): Fixing README.md documentation and branding in order to render correctly in pub.dev.
Full Changelog: v3.2.1...v3.2.2
v3.2.1
- BREAKING (MCP):
find_bugs_by_developeris removed and merged into
analyze_bug_hotspotsvia a new optionalauthorparameter (plus
positiveRegex/negativeRegex, previously only available on the removed
tool). Both tools ran the identical RA-SZZ pipeline (SzzAlgorithm) and
only differed in whether the resulting matches were aggregated or
filtered by author;analyze_bug_hotspotsnow does both in one call,
returning an additionaldeveloper_bug_analysissection whenauthoris
supplied. Clients callingfind_bugs_by_developermust switch to
analyze_bug_hotspotswith theauthorparameter.BugHotspotsHeuristic
is refactored into a pureaggregate(List<SzzMatch>)function (no longer
owns theSzzAlgorithmcall), so the shared SZZ pass now runs once per
analyze_bug_hotspotsinvocation instead of twice. - DOCS (Tools): Merged
doc/tools/history/find_bugs_by_developer.md
intodoc/tools/history/analyze_bug_hotspots.md, folding in the
developer-filtering phase and the Zimmermann et al. (2007) Cross-Project
Defect Prediction citation. Updated thefind_bugs_by_developer.md
cross-references indoc/tools/history/generate_changelog.mdto point at
analyze_bug_hotspots.md.README.mdno longer lists
find_bugs_by_developerand documents theauthorfilter under
analyze_bug_hotspots. -
- Fixed:
get_contributions_by_authornow actually implements the
git shortlog -sn --no-merges [--since=<date>] [--until=<date>]behavior
its documentation already described.ShortlogCommandpreviously ran a
baregit shortlog HEAD -sand silently ignored its ownextraArgs
parameter — sort-by-count (-n), merge-commit exclusion (--no-merges),
and date-range filtering were all doc-only. This was a doc/implementation
gap fix (not a new feature):since/untilare validated with the same
sharedisValidDateInputand forwarded throughRwGit.contributionsByAuthor
exactly like the report tools.
- Fixed:
- Added: The five report meta-tools (
generate_technical_report,
generate_pm_report,generate_code_review_report,
generate_security_report,generate_repository_audit) now accept
optionalsince/untilparameters for date-bounded analysis (e.g.
"report for 2024" viasince: "2024-01-01", until: "2025-01-01", or "the
previous 6 months" viasince: "6 months ago"). Values are validated
(sharedisValidDateInputinlib/src/mcp/utils/date_range_validation.dart)
and forwarded verbatim to git's own--since=/--until=date parsing — no
natural-language date math is implemented in Dart. The effective window is
echoed back in the report'smetadatawhen supplied. Every underlying
analyzer the report orchestrator composes (churn, bus factor, SZZ bug
hotspots, logical coupling, code volatility, refactoring detection,
architecture drift, secrets scanning, compliance scanning, mega/suspicious
commit detection) now accepts the samesince/untilparameters. - Changed (MCP offload contract): The offload
previewbuilt by
McpToolFileOffloadDecoratorno longer strips the per-findingrationale
field or caps thehintslist at 3 entries — both are now carried in
full, matching the uncapped full-report contract. The now-unused
previewStrippedFindingKeys/previewHintsLimitconstants are removed
fromlib/src/constants.dart.
What's Changed
- Updating documentation (correcting descriptions, making things clearer) by @gbrandtio in #10
Full Changelog: v3.2.0...v3.2.1