Safe C++ modernization

Modernize C++ without breaking your code.

Legacyless upgrades outdated C++ constructs with deterministic, provably safe transformations.

No AI-generated edits. No risky refactors. Only reviewable changes.

$ legacyless preview .

Legacyless Preview Workspace
============================
Status: PREVIEW FOUND CHANGES
Files scanned: 42
Diagnostics: 0
Planned edits: 19

Rule results:
- nullptr: 10 edits
- override: 9 edits

Patch preview for: src/render_pipeline.cpp
- Widget* ptr = NULL;
+ Widget* ptr = nullptr;
$ legacyless apply src/render_pipeline.cpp --report-json

Legacyless Apply Current File
=============================
Status: APPLY SUCCESS
File: src/render_pipeline.cpp
Diagnostics: 0
Applied edits: 4
Verification: clean

Rule results:
- override: 3 edits
- nullptr: 1 edit

JSON report used for summary output.
// deterministic, reviewable diff
struct Renderer : BaseRenderer {
-   void flush();
+   void flush() override;
};

- Connection* current = NULL;
+ Connection* current = nullptr;
// same input -> same output

How it works

Simple, reviewable workflow.

1. Scan

Point Legacyless at a real C++ project with compile_commands.json.

2. Preview

Inspect deterministic, reviewable changes before touching files.

3. Apply

Apply only the transformations that are provably safe.

Core principles

Built around trust.

Safe

Conservative rules focused on changes teams can actually review and adopt.

Deterministic

Consistent inputs should produce consistent edits and predictable diffs.

Explainable

Small, readable transformations with intent that is easy to justify in review.

Example transformations

Focused changes, clean diffs.

nullptr modernization

current rule

Before

Widget* ptr = NULL;
use(ptr, 0);

After

Widget* ptr = nullptr;
use(ptr, nullptr);

missing override

current rule

Before

struct Derived : Base {
  void render();
};

After

struct Derived : Base {
  void render() override;
};

Why Legacyless

Designed for trust, not guesswork.

No AI-generated edits

Legacyless uses deterministic, rule-based transformations instead of probabilistic code generation.

Not blind replacement

Rules are applied with project-aware analysis, not naive text substitution.

Built for review

Each change is small, explainable, and designed to produce clean diffs.

Rules preview

Current ruleset.

Open full rules page

Rule 01

nullptr

Replaces legacy null pointer constants when pointer intent is clear.

See rule

Rule 02

override

Adds missing override when the function is already overriding.

See rule