pw_presubmit- Vacuum code lint on every commit
Presubmit checks are essential tools, but they take work to set up, and projects don’t always get around to it. The
pw_presubmit module provides tools for setting up high quality presubmit checks for any project. We use this framework to run Pigweed’s presubmit on our workstations and in our automated building tools.
pw_presubmit module includes
pw format command, a tool that provides a unified interface for automatically formatting code in a variety of languages. With
pw format, you can format C, C++, Python, GN, and Go code according to configurations defined by your project.
pw format leverages existing tools like
clang-format, and it’s simple to add support for new languages.
pw_env_setup- Cross platform embedded compiler setup
A classic problem in the embedded space is reducing the time from git clone to having a binary executing on a device. The issue is that an entire suite of tools is needed for non-trivial production embedded projects. For example:
In the server space, container solutions like Docker or Podman solve this; however, in our experience container solutions are a mixed bag for embedded systems development where one frequently needs access to native system resources like USB devices, or must operate on Windows.
pw_env_setup is our compromise solution for this problem that works on Mac, Windows, and Linux. It leverages the Chrome packaging system CIPD to bootstrap a Python installation, which in turn inflates a virtual environment. The tooling is installed into your workspace, and makes no changes to your system. This tooling is designed to be reused by any project.