Skip to main content

Clang Tidy Runner

Installation

Please install it via pip install pyclang.

pyclang

Examples

import os

from pyclang import Runner

# all the dirs you want to run clang-tidy in, will use this value to pass to all chained methods automatically
runner = Runner([os.path.join(os.environ['IDF_PATH'], 'examples', 'get-started', 'hello_world')])
runner.idf_reconfigure().normalize()  # each function is a step, all these steps are chainable
runner()  # the class instance is callable, call it to run all the chained methods

You can write custom chain method by using decorator @chain.

Restrictions: all arguments are fixed, you need to pass the rest of them when initializing Runner instance with kwargs

  • folder: which is the folder you passed when initializing Runner instance
import os

from pyclang import Runner


class CustomRunner(Runner):
    @chain
    def hello(self, *args):
        print('hello world')


# and used by
runner = Runner([os.path.join(os.environ['IDF_PATH'], 'examples', 'get-started', 'hello_world')])
runner.hello().idf_reconfigure()
runner()

Use as a script

You can also customize it into a scripts. Now we provide a predefined script: idf_clang_tidy, which procedure is: idf_reconfigure().filter_cmd().run_clang_tidy().normalize(). You can run it by idf_clang_tidy --help for detail.

Metadata

Release files for pyclang 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyclang 0.7.0
File Size Uploaded
pyclang-0.7.0.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyclang 0.7.0
File Interpreter ABI Platform
pyclang-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.7 kB

Release files / pyclang-0.7.0.tar.gz

Download URL pyclang-0.7.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b3d48787bb67489164d06ef0343328d651831b45f0eb67e0fec9221efa26a5f5
BLAKE2b-256 checksum
How to use checksums
ffec8b6c6bcf9d518225c682116c75331cab0c2cca00dcb0793ffd21bba7300d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.14

Release files / pyclang-0.7.0-py3-none-any.whl

Download URL pyclang-0.7.0-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a19d333ab02ab0df486e29fabf961b8e3748d8b5343d8170764e49f114bb8393
BLAKE2b-256 checksum
How to use checksums
708bd511486697773a3b2789f248576bee892882ee87b6c2408ffc10a1588bcc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.3

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page