{"id":23908,"library":"j2lint","title":"j2lint","description":"j2lint is a command-line utility that validates Jinja2 syntax according to Arista's AVD style guide. It checks for formatting, spelling, and structural issues in Jinja2 templates. Current version: 1.2.0. Release cadence: occasional, maintenance mode.","status":"active","version":"1.2.0","language":"python","source_language":"en","source_url":"https://github.com/aristanetworks/j2lint.git","tags":["jinja2","linter","style-guide","avd","arista"],"install":[{"cmd":"pip install j2lint","lang":"bash","label":"PyPI install"}],"dependencies":[],"imports":[{"note":"J2LintRunner is directly under j2lint package, not in j2lint.j2lint submodule.","wrong":"from j2lint.j2lint import J2LintRunner","symbol":"J2LintRunner","correct":"from j2lint import J2LintRunner"},{"note":"Linter class lives in j2lint.linter module.","wrong":"from j2lint import Linter","symbol":"Linter","correct":"from j2lint.linter import Linter"}],"quickstart":{"code":"from j2lint import J2LintRunner\nrunner = J2LintRunner()\nrunner.run(['template.j2'])","lang":"python","description":"Run j2lint programmatically on a Jinja2 template file."},"warnings":[{"fix":"Update parsing logic to expect JSON output, or use the --format plain flag (if available) to revert to old style.","message":"Version 1.0.0 changed the CLI output format from plain text to structured JSON. Scripts parsing stdout will break.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Pass files with .j2 extension or use --ext .<ext> to add custom extensions.","message":"By default, j2lint only checks files with .j2 extension. Other extensions are ignored unless explicitly passed.","severity":"gotcha","affected_versions":"all"},{"fix":"Disable specific rules via --ignore RULE or create a custom config file.","message":"j2lint's built-in rules are opinionated towards Arista's AVD style guide. Running on non-AVD templates may produce many false positives.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install --upgrade j2lint' to reinstall in the current environment.","cause":"j2lint is not installed or the environment is broken.","error":"pkg_resources.DistributionNotFound: The 'j2lint' distribution was not found and is required by the application"},{"fix":"Upgrade to Python 3.9 or later.","cause":"Incompatible Python version.","error":"ERROR: j2lint requires Python >=3.9 but you have Python 3.8"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}