Skip to content

Releases: rw-core/rw-git

3.4.1

Choose a tag to compare

@gbrandtio gbrandtio released this 12 Jul 19:43
  • 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

Choose a tag to compare

@gbrandtio gbrandtio released this 12 Jul 09:28
  • FEAT (Metrics): Added a shared NestingResolver that computes control-flow nesting depth per token in a single pass, with per-language strategies declared via a new BlockStructure on LanguageProfile: 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 via lexical_metrics.dart. See ADR-0018.
  • BREAKING (Metrics): Rewrote CognitiveComplexityAlgorithm against the SonarSource specification on top of resolved depths. Function bodies, argument lists, and literals no longer count as nesting; else/elif score a flat +1 with else if collapsed to one increment; switch counts once and case arms do not; ternary ? counts (disambiguated from nullable-type markers) and ?? scores +1; C preprocessor #if is 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): IndentationComplexityAlgorithm now 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): FsmLexer stamps 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 from controlFlowKeywords (they lex as operators and could never match identifier lookups); added lambdaIntroducers (=>, ->) and keyword-end block vocabularies to the default profiles.
  • BREAKING (Metrics): Rewrote NpathComplexityAlgorithm to utilize NestingResolver to 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): AbcScoreAlgorithm now 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

Full Changelog: v3.3.2...v3.4.0

v3.3.2

Choose a tag to compare

@gbrandtio gbrandtio released this 11 Jul 21:44
  • 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

Choose a tag to compare

@gbrandtio gbrandtio released this 11 Jul 18:38
  • 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

Choose a tag to compare

@gbrandtio gbrandtio released this 11 Jul 15:38

3.3.0

  • FEAT (Library): Exposed the pure lexical metrics algorithms (FsmLexer, CyclomaticComplexityAlgorithm, HalsteadComplexityAlgorithm, etc.) via lexical_metrics.dart so 3rd party packages can build custom static analysis pipelines.
  • FEAT (Library): Added a new LexicalMetricsRunner facade 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

Choose a tag to compare

@gbrandtio gbrandtio released this 11 Jul 11:21

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

Choose a tag to compare

@gbrandtio gbrandtio released this 10 Jul 21:04
  • PERF (Quality): Drastically improved the execution time of intelligence tools across large Git repositories (e.g. >10,000 commits) by refactoring ChurnHeuristic to use git log --name-only instead of the heavy git log -p. This eliminates huge amounts of text-parsing overhead.
  • BREAKING (Core/MCP): Removed classChurn and blockChurn from ChurnMetricsDto and ChurnMetricsWithAuthorsDto across the codebase, as the granular tracking of functions and classes was removed to optimize analysis at the file level. The analyze_code_quality tool now exclusively reports high_churn_files.
  • PERF (Quality): Introduced chunked concurrency in SzzAlgorithm.execute(). The algorithm now groups fix-commits into batches (batch size of 10) to execute _traceIntroducingCommits in 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

Choose a tag to compare

@gbrandtio gbrandtio released this 10 Jul 09:43
  • FIX (Core): Fixed an issue where git diff and git log commands would crash on binary or unreadable files (e.g., .doc files) due to failing textconv or external diff drivers. The StandardProcessRunner now universally injects --no-ext-diff and --no-textconv into 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

Choose a tag to compare

@gbrandtio gbrandtio released this 08 Jul 20:18

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

Choose a tag to compare

@gbrandtio gbrandtio released this 08 Jul 20:04
16bfa8c
  • BREAKING (MCP): find_bugs_by_developer is removed and merged into
    analyze_bug_hotspots via a new optional author parameter (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_hotspots now does both in one call,
    returning an additional developer_bug_analysis section when author is
    supplied. Clients calling find_bugs_by_developer must switch to
    analyze_bug_hotspots with the author parameter. BugHotspotsHeuristic
    is refactored into a pure aggregate(List<SzzMatch>) function (no longer
    owns the SzzAlgorithm call), so the shared SZZ pass now runs once per
    analyze_bug_hotspots invocation instead of twice.
  • DOCS (Tools): Merged doc/tools/history/find_bugs_by_developer.md
    into doc/tools/history/analyze_bug_hotspots.md, folding in the
    developer-filtering phase and the Zimmermann et al. (2007) Cross-Project
    Defect Prediction
    citation. Updated the find_bugs_by_developer.md
    cross-references in doc/tools/history/generate_changelog.md to point at
    analyze_bug_hotspots.md. README.md no longer lists
    find_bugs_by_developer and documents the author filter under
    analyze_bug_hotspots.
    • Fixed: get_contributions_by_author now actually implements the
      git shortlog -sn --no-merges [--since=<date>] [--until=<date>] behavior
      its documentation already described. ShortlogCommand previously ran a
      bare git shortlog HEAD -s and silently ignored its own extraArgs
      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/until are validated with the same
      shared isValidDateInput and forwarded through RwGit.contributionsByAuthor
      exactly like the report tools.
  • Added: The five report meta-tools (generate_technical_report,
    generate_pm_report, generate_code_review_report,
    generate_security_report, generate_repository_audit) now accept
    optional since/until parameters for date-bounded analysis (e.g.
    "report for 2024" via since: "2024-01-01", until: "2025-01-01", or "the
    previous 6 months" via since: "6 months ago"). Values are validated
    (shared isValidDateInput in lib/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's metadata when 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 same since/until parameters.
  • Changed (MCP offload contract): The offload preview built by
    McpToolFileOffloadDecorator no longer strips the per-finding rationale
    field or caps the hints list at 3 entries — both are now carried in
    full, matching the uncapped full-report contract. The now-unused
    previewStrippedFindingKeys/previewHintsLimit constants are removed
    from lib/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