Rtos API example

Embed: (wiki syntax)

« Back to documentation index

tools::targets::lint Namespace Reference

tools::targets::lint Namespace Reference

Functions

def must_have_keys
def may_have_keys
def check_extra_labels
def check_release_version
def check_mcu
def check_board
def add_if
def check_hierarchy
def targets_cmd
def all_targets_cmd
def orphans_cmd
def main

Detailed Description

A linting utility for targets.json

This linting utility may be called as follows:
python <path-to>/lint.py targets TARGET [TARGET ...]

all targets will be linted

Function Documentation

def tools::targets::lint::add_if (   dict,
  key,
  val 
)
Add a value to a dict if it's non-empty

Definition at line 134 of file lint.py.

def tools::targets::lint::all_targets_cmd (  )
Print all errors about all parts

Definition at line 253 of file lint.py.

def tools::targets::lint::check_board (   board_json,
  strict = False 
)
Generate a list of problems with an board

:param: board_json the mcus dict to check
:param: strict enforce required keys

Definition at line 121 of file lint.py.

def tools::targets::lint::check_extra_labels (   dict )
Check that extra_labels does not contain any Target names

is a generator for errors

Definition at line 53 of file lint.py.

def tools::targets::lint::check_hierarchy (   tgt )
Atempts to assign labels to the heirarchy

Definition at line 189 of file lint.py.

def tools::targets::lint::check_mcu (   mcu_json,
  strict = False 
)
Generate a list of problems with an MCU

:param: mcu_json the MCU's dict to check
:param: strict enforce required keys

Definition at line 99 of file lint.py.

def tools::targets::lint::check_release_version (   dict )
Verify that release version 5 is combined with support for all toolcahins

is a generator for errors

Definition at line 63 of file lint.py.

def tools::targets::lint::main ( void   )
entry point

Definition at line 270 of file lint.py.

def tools::targets::lint::may_have_keys (   keys,
  dict 
)
Disable all other keys in an MCU/Board

is a generator for errors

Definition at line 44 of file lint.py.

def tools::targets::lint::must_have_keys (   keys,
  dict 
)
Require keys in an MCU/Board

is a generator for errors

Definition at line 35 of file lint.py.

def tools::targets::lint::orphans_cmd (  )
Find and print all orphan targets

Definition at line 259 of file lint.py.

def tools::targets::lint::targets_cmd (   mcus = [] )
Find and print errors about specific targets

Definition at line 247 of file lint.py.