Skip to content

Static Analysis in 2026: Beyond Linting

Choose static analysis tools for types, security data flow and architecture rules. Follow a staged setup and tune findings against your team’s actual defects.

7 min read
Illustrative layered circuit assembly revealing connections beneath the surface.
On this page

Somewhere around 2018, static analysis became synonymous with linting. ESLint, Prettier, RuboCop. Teams would set them up, check the "we do static analysis" box, and move on. In 2026, that's like saying you do security because you have a password field on your login form.

I'm not knocking linters. I run ESLint and Prettier on every project. But linting is the lowest rung of what static analysis can do for you, and if that's where you stop, you're leaving the most valuable insights on the table.

What Static Analysis Actually Means

Static analysis examines different properties The categories are complementary checks. Style and types Formatting and linting Configured type checks Security flow Sources and sinks Sanitisation paths Architecture Package dependencies Boundary constraints
Figure 1. Select checks according to the properties the team needs to examine.

Static analysis examines source code without executing the application. It includes linting, type checking and other analyses. The code intelligence guide places these structural checks alongside runtime and historical evidence.[1]

Here's the spectrum, from least to most sophisticated:

  1. Formatting - Prettier, gofmt. Standardise code presentation; formatters do not establish semantic correctness.
  2. Linting - ESLint, Pylint. Catches common mistakes and enforces conventions.
  3. Type checking - TypeScript, mypy. Check types under the language’s rules and configured assumptions.
  4. Semantic analysis - Tools that understand what code does, not just how it looks.
  5. Architectural analysis - Tools that enforce structural rules across the entire codebase.
  6. AI-augmented analysis - LLM-powered tools that can reason about intent and context.

Use the levels as a planning aid for the checks your system needs. A higher level in this list does not establish that a team ships more reliable software.

Semantic Analysis: Where Things Get Interesting

Semantic analysis tools go beyond pattern matching. They build a model of your program's behavior and use it to find bugs that no linter could catch.

Take taint analysis as an example. A taint analysis tool tracks data from user input ("sources") through your program to sensitive operations ("sinks") like database queries or file system calls. If untrusted data reaches a sink without being sanitized, the tool flags it.[2]

typescript
// A linter sees nothing wrong here
app.get('/user', (req, res) => {
  const userId = req.query.id;
  const user = db.query(`SELECT * FROM users WHERE id = ${userId}`);
  res.json(user);
});

// A semantic analysis tool sees SQL injection
// because req.query.id (source) flows to db.query (sink) unsanitized

Tools doing this well in 2026:

  • Semgrep: Open source, supports custom rules written in a pattern-matching DSL. I've written over 200 custom Semgrep rules for various projects. It's the most flexible option.
  • CodeQL: GitHub's query language for code. Treats code as data you can query with SQL-like syntax. Incredible power, steeper learning curve.
  • SonarQube: The enterprise standard. Good out-of-the-box rules, less flexible for custom analysis.
  • Snyk Code: Real-time analysis in your IDE with AI-powered suggestions.

Architectural Analysis: Enforcing Boundaries

This is the area I'm most excited about and where I see the biggest gap in most teams' toolchains.

Architectural analysis checks source dependencies against explicit structural rules. The architecture fitness-function guide shows how those checks can run repeatedly, while dependency mapping helps identify the boundaries to enforce.[3]

java
// Example: ArchUnit rules (Java ecosystem)
// "Controllers should not directly access repositories"
noClasses()
  .that().resideInAPackage("..controller..")
  .should().dependOnClassesThat().resideInAPackage("..repository..");

// "Domain models should not depend on infrastructure"
classes()
  .that().resideInAPackage("..domain..")
  .should().onlyDependOnClassesThat()
  .resideInAnyPackage("..domain..", "java..", "kotlin..");

In the TypeScript world, tools like Dependency Cruiser and Sheriff let you define similar rules:[4]

javascript
// .dependency-cruiser.cjs
module.exports = {
  forbidden: [
    {
      name: 'no-circular',
      severity: 'error',
      from: {},
      to: { circular: true }
    },
    {
      name: 'no-ui-in-domain',
      severity: 'error',
      from: { path: '^src/domain' },
      to: { path: '^src/ui' }
    }
  ]
};

Run this in CI, and you'll catch architectural drift the moment it happens, not six months later during a painful refactor.

The Framework: SCALE Your Static Analysis

SCALE static analysis Style Agree formatting and linting Correctness Configure type/security checks Architecture Enforce dependency boundaries Logic Write project-specific rules Evolution Review findings and adjust
Figure 2. Review the rules against the defects and noise the team actually sees.

Here's a framework I use when setting up static analysis for a new team or project:

S - Style (Week 1): Set up formatting and basic linting. Prettier + ESLint with a reasonable config. Don't bikeshed. Pick a config and move on. This eliminates noise in code reviews.

C - Correctness (Week 2): Enable TypeScript strict mode. Turn on noUncheckedIndexedAccess, exactOptionalPropertyTypes, and noImplicitReturns. Add Semgrep with the default security rules.

A - Architecture (Month 1): Define your architectural boundaries. Set up Dependency Cruiser or equivalent. Start with the rules you care most about: no circular dependencies, layer separation, module boundaries.

L - Logic (Month 2): Write custom Semgrep or CodeQL rules for your business-specific patterns. "Every API endpoint must validate input with Zod." "Every database call must be inside a transaction boundary." These rules encode your team's knowledge.

E - Evolution (Ongoing): Review your static analysis findings monthly. Which rules generate the most noise? Remove them. Which bug categories keep slipping through? Write rules for them. Your static analysis config should evolve with your codebase.

The Contrarian Take: More Rules Isn't Better

I've seen teams with 500+ ESLint rules enabled. Their CI takes 4 minutes just for linting. Developers routinely add // eslint-disable-next-line comments. The signal-to-noise ratio is terrible.

Here's my rule of thumb: if a static analysis rule has more than a 5% false positive rate, disable it. A rule that cries wolf erodes trust in the entire system. I'd rather have 50 rules that developers trust and fix immediately than 500 rules they've learned to ignore.

The best static analysis setup isn't the most strict one. It's the one your team actually listens to.

What 2026 Brings: LLM-Augmented Analysis

The newest frontier is using LLMs to augment traditional static analysis. Tools like GitHub Copilot's code review features can catch issues that are hard to express as rules. "This error message exposes internal implementation details to users." "This retry logic doesn't have exponential backoff, which will amplify cascading failures."

These aren't things you can write a regex for. They require understanding intent, not just syntax.

We're at the beginning of this shift, and the tools are imperfect. But the direction is clear: static analysis in 2027 will look as different from today as today looks from 2018's "just run ESLint" era.

Start climbing the spectrum now, and you'll be ready.

Frequently asked questions

Is linting the same as static analysis?

Linting is one form of static analysis. The category also includes type checking, data-flow analysis and architectural dependency checks, with different tools examining different properties of the source.

What does taint analysis look for?

Taint analysis follows data from an untrusted source toward a sensitive sink and checks the transformations or sanitisation on the path. Inspect the result against the tool’s rule and the application’s actual input handling.

How can we enforce architectural boundaries?

Define permitted dependencies between packages or modules, then run a tool that checks the source against those rules. Dependency-cruiser and ArchUnit express such constraints for their supported ecosystems.

Should we enable every available analysis rule?

Review whether a rule catches problems relevant to the system and whether the team can act on its findings. Investigate recurring noise, adjust the configuration and retain checks that reviewers understand and use.

Sources

  1. [1]TSConfig Option: strict · TypeScript
  2. [2]Taint analysis overview - Semgrep · Semgrep
  3. [3]ArchUnit User Guide · ArchUnit
  4. [4]dependency-cruiser/doc/cli.md at main · sverweij/dependency-cruiser · dependency-cruiser maintainers

Checked against these sources on

Related Articles