Urgent.News

What's breaking now, across thousands of outlets.

AI

ImpactGate: A merge gate that scores the structural decay AI adds

ImpactGate is a tool that evaluates the structural decay introduced by code changes. It can be run as a standalone command line interface, a Git pre-commit hook, or a plugin in GitHub, GitLab, and Jenkins CI. The tool scores a change against a base, typically the main branch, using the WMC_other metric, which measures complexity already present in the container being edited.

Changes that add new files or classes are considered cheap, while adding to an already-heavy class is expensive, indicating structural decay. If the impact is too high, ImpactGate advises simplifying the change or refactoring the code. It can warn or block the commit, with the latter failing the build. The tool can also be run without installation via a published image, bundled with Git.

The scoring process generates a list of files to consider for refactoring, ranked by their contribution to the overall impact. Changes with a diff larger than a specified maximum are typically skipped to prevent distortion of the impact score. The tool allows for customization of the threshold through a configuration file or command line flags, enabling teams to set an appropriate value based on their specific needs.

ImpactGate can be integrated into CI pipelines, with a ready-made example available for GitLab CI workflows. By integrating ImpactGate into the development process, teams can proactively identify and address structural decay, improving code quality and maintainability.

Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at github.com →

More in AI

Reimagining advertising with AI

Explore new AI-powered advertising experiences from OpenAI, including Sponsored Agents, tools for marketers, and integrations with HubSpot and Shopify.

Firefox Touts Lower CPU Use for Large JPEGs, Faster PDF Viewer Startup (and AI Controls)

Firefox 156 is the second release since Mozilla moved to a twice-monthly release schedule, and the blog OMG Ubuntu notes it has faster start-up times for its built-in PDF viewer and also lower CPU…

  • Firefox 156 reduces PDF startup time by 45% with faster background worker
  • Firefox 156 uses libjpeg-turbo for 20% memory reduction in large JPEGs
  • AI controls centralized in General Settings for individual feature toggling

More from Wednesday 16 September →