---
title: "identical-if-chain-branches"
description: "Detect repeated if-chain branches."
image: "https://strider.gempir.com/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://strider.gempir.com/llms.txt
> Use this file to discover all available pages before exploring further.

# identical-if-chain-branches

<!-- Code generated by docs/scripts/generate-check-docs.go; DO NOT EDIT. -->

**Default severity:** `warning`

Detect repeated if-chain branches.

## Bad

```go
if first { run() } else if second { run() }
```

## Good

```go
if first { one() } else if second { two() }
```

Source: https://strider.gempir.com/lints/identical-if-chain-branches/index.mdx
