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.
| Tier | Rules | Price |
|---|---|---|
| Community (free) | 18 rules | Free — pip install perf-lint-tool |
| Pro | 18 + 17 extended = 35 rules | £9/month |
| Team | 18 + 35 extended = 53 rules + team config | £29/month |
Installation
Section titled “Installation”pip install perf-lint-toolperf-lint --versionRequires Python 3.8+.
Basic Usage
Section titled “Basic Usage”# Check a scriptperf-lint check my-test.jmxperf-lint check my-script.jsperf-lint check MySimulation.scala
# Auto-fix supported rulesperf-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 JSONperf-lint check my-test.jmx --format jsonExit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
0 | No errors (warnings/info may be present) |
1 | One or more errors found |
2 | Tool error (file not found, parse failure, etc.) |
Use exit code 1 to fail CI pipelines on errors.
Configuration
Section titled “Configuration”Create .perf-lint.yml in your project root:
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 APIapi_sync: enabled: true # API key from perf-ecosystem.yml or set directly: api_key: "${PERF_LINT_API_KEY}"Rule Categories
Section titled “Rule Categories”JMeter Rules (JMX prefix)
Section titled “JMeter Rules (JMX prefix)”| Rule | Severity | Description |
|---|---|---|
| JMX001 | WARN | Thread group uses “Forever” loop |
| JMX010 | ERROR | HTTP sampler missing explicit timeout |
| JMX015 | ERROR | Hardcoded hostname — use variables |
| JMX020 | WARN | No assertions on any sampler |
| JMX025 | WARN | Think time missing between requests |
| JMX030 | ERROR | CSV Data Set Config references missing file |
| JMX035 | WARN | Regex extractor with greedy match |
| JMX040 | INFO | Result tree listener left enabled |
| JMX042 | INFO | Parameterise VU count |
| JMX050 | ERROR | Non-standard response code handling |
Full rule reference: perflint.martkos-it.co.uk
k6 Rules (K6 prefix)
Section titled “k6 Rules (K6 prefix)”| Rule | Severity | Description |
|---|---|---|
| K6001 | ERROR | sleep() missing between requests |
| K6005 | WARN | No threshold defined |
| K6010 | ERROR | Hardcoded URL |
| K6015 | WARN | check() result not validated |
| K6020 | WARN | No gracefulStop defined |
| K6025 | ERROR | open() called inside VU function |
Gatling Rules (GTL prefix)
Section titled “Gatling Rules (GTL prefix)”| Rule | Severity | Description |
|---|---|---|
| GTL001 | WARN | Pause time missing |
| GTL005 | ERROR | No assertions defined |
| GTL010 | WARN | Constant load profile — consider ramp |
| GTL015 | ERROR | Hardcoded base URL |
GitHub Action
Section titled “GitHub Action”Zero-configuration lint step for GitHub Actions:
- 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 | infoAvailable on GitHub Marketplace.
perf-lint API (Hosted)
Section titled “perf-lint API (Hosted)”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.
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.
Pro/Team Features
Section titled “Pro/Team Features”- 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.ymlacross projects via the API; changes propagate without re-deploying - SARIF integration — upload results to GitHub Advanced Security for in-PR annotations
Ecosystem Integration
Section titled “Ecosystem Integration”When perf-ecosystem.yml is present with services.perf_lint_api configured:
- Auto-syncs rule configuration from the team config store
perf-migratorauto-lints converted scripts ifintegrations.migrator_validate: true
- Install:
pip install perf-lint-tool - GitHub: markslilley/perf-lint
- Store: martkos-it.co.uk/store/perf-lint
- Hosted linter: perflint.martkos-it.co.uk