Skip to content

perf-lint

import { Aside, Badge } from ‘@astrojs/starlight/components’;

perf-lint is the only dedicated linter for performance test scripts across JMeter, k6, and Gatling. It enforces 53 rules covering correctness, performance anti-patterns, and best practices.

TierRulesPrice
Community (free)18 rulesFree — pip install perf-lint-tool
Pro18 + 17 extended = 35 rules£9/month
Team18 + 35 extended = 53 rules + team config£29/month
Terminal window
pip install perf-lint-tool
perf-lint --version

Requires Python 3.8+.

Terminal window
# Check a script
perf-lint check my-test.jmx
perf-lint check my-script.js
perf-lint check MySimulation.scala
# Auto-fix supported rules
perf-lint check my-test.jmx --fix
# Output as SARIF (for GitHub code scanning)
perf-lint check my-test.jmx --format sarif --output results.sarif
# Output as JSON
perf-lint check my-test.jmx --format json
CodeMeaning
0No errors (warnings/info may be present)
1One or more errors found
2Tool error (file not found, parse failure, etc.)

Use exit code 1 to fail CI pipelines on errors.

Create .perf-lint.yml in your project root:

.perf-lint.yml
version: "1.0"
rules:
# Disable a specific rule
JMX001: off
# Change severity
JMX010: warn # default: error
# Rule with config
JMX042:
severity: warn
max_vus: 500
ignore:
- "tests/legacy/**"
- "**/*.bak.jmx"
# Pro/Team: sync rule config from perf-lint API
api_sync:
enabled: true
# API key from perf-ecosystem.yml or set directly:
api_key: "${PERF_LINT_API_KEY}"
RuleSeverityDescription
JMX001WARNThread group uses “Forever” loop
JMX010ERRORHTTP sampler missing explicit timeout
JMX015ERRORHardcoded hostname — use variables
JMX020WARNNo assertions on any sampler
JMX025WARNThink time missing between requests
JMX030ERRORCSV Data Set Config references missing file
JMX035WARNRegex extractor with greedy match
JMX040INFOResult tree listener left enabled
JMX042INFOParameterise VU count
JMX050ERRORNon-standard response code handling

Full rule reference: perflint.martkos-it.co.uk

RuleSeverityDescription
K6001ERRORsleep() missing between requests
K6005WARNNo threshold defined
K6010ERRORHardcoded URL
K6015WARNcheck() result not validated
K6020WARNNo gracefulStop defined
K6025ERRORopen() called inside VU function
RuleSeverityDescription
GTL001WARNPause time missing
GTL005ERRORNo assertions defined
GTL010WARNConstant load profile — consider ramp
GTL015ERRORHardcoded base URL

Zero-configuration lint step for GitHub Actions:

.github/workflows/perf.yml
- name: Lint performance scripts
uses: markslilley/perf-lint-action@v1
with:
path: tests/performance/
tool: jmeter # jmeter | k6 | gatling | auto
fail-on: error # error | warn | info

Available on GitHub Marketplace.

The hosted API at perflint.martkos-it.co.uk accepts script uploads and returns lint results. Useful for web dashboards or CI systems without Python.

Terminal window
curl -X POST https://perflint.martkos-it.co.uk/api/lint \
-H "X-API-Key: ${PERF_LINT_API_KEY}" \
-F "file=@my-test.jmx" \
-F "tool=jmeter"

Rate limits: Free 50 scans/month · Pro 500 scans/month · Team unlimited.

See perf-lint API reference for full endpoint documentation.

  • 35 extended rules (Pro) — deeper analysis: correlator pattern detection, resource leak detection, protocol-specific anti-patterns
  • 53 rules total (Team) — all extended rules plus team-specific checks
  • Team configuration — share .perf-lint.yml across projects via the API; changes propagate without re-deploying
  • SARIF integration — upload results to GitHub Advanced Security for in-PR annotations

When perf-ecosystem.yml is present with services.perf_lint_api configured:

  • Auto-syncs rule configuration from the team config store
  • perf-migrator auto-lints converted scripts if integrations.migrator_validate: true