Chasten Your Python Program: Configurable Program Analysis and Linting with XPath

30 Minute Talk
Saturday at 11:00 am in Ballroom C

Abstract

Stop wrestling with regular expressions (regex) and complex abstract syntax tree
(AST)-based frameworks to analyze and lint your Python code! Chasten offers an
elegant solution by leveraging XPath expressions to search Python's abstract
syntax tree, making static code analysis both powerful and accessible. In this
talk, you'll discover how to implement custom linting rules, enforce coding
standards, and perform sophisticated pattern matching in your Python projects
using a tool designed for both simplicity and flexibility. Whether you're a
developer tired of writing fragile regex patterns, an instructor validating
student code, or a project maintainer who wants to ensure code quality, Chasten
provides the perfect balance of power and usability for your static analysis
needs. More details about chasten are available at:
https://github.com/AstuteSource/chasten.

Key Takeaways

  • Create custom linting rules through simple YAML configuration
  • Practical examples of enforcing code standards on documentation and code
  • Ways to analyze results through interactive dashboards with Datasette
  • How to integrate Chasten into development workflow and CI/CD pipelines