Skip to main content

Conflict Prediction

squirex conflict predicts merge conflicts between branches before you run git merge, analyzing Apex method signatures and SOQL dependency overlaps.


Usageโ€‹

squirex conflict -b main,feature/my-branch

Outputโ€‹

Conflict Prediction: main โ†” feature/my-branch
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
HIGH RISK:
AccountController.cls :: getActiveAccounts()
โ€ข main: returns List<Account> with 3 SOQL filters
โ€ข feature: adds 2 additional WHERE clauses โ€” query result incompatible

MEDIUM RISK:
ContactService.cls :: createContact()
โ€ข Both branches modified parameter list (different signatures)

NO CONFLICT:
OpportunityHandler.cls โ€” only modified in feature branch

How It Worksโ€‹

SquireX parses both branches' Apex ASTs and identifies:

  1. Signature conflicts โ€” same method, different parameter types or return types
  2. SOQL dependency conflicts โ€” same SOQL target, diverging field lists
  3. DML target conflicts โ€” both branches performing DML on the same SObject type in the same method