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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyclang-0.7.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyclang-0.7.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file pyclang-0.7.0.tar.gz.

File metadata

  • Download URL: pyclang-0.7.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for pyclang-0.7.0.tar.gz
Algorithm Hash digest
SHA256 b3d48787bb67489164d06ef0343328d651831b45f0eb67e0fec9221efa26a5f5
MD5 162f6f34e25f6230ee6aaaf34c62e685
BLAKE2b-256 ffec8b6c6bcf9d518225c682116c75331cab0c2cca00dcb0793ffd21bba7300d

See more details on using hashes here.

File details

Details for the file pyclang-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: pyclang-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for pyclang-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a19d333ab02ab0df486e29fabf961b8e3748d8b5343d8170764e49f114bb8393
MD5 bd4d919160833f3f8a7f095a513d4e0e
BLAKE2b-256 708bd511486697773a3b2789f248576bee892882ee87b6c2408ffc10a1588bcc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page