diff options
| author | Petr Machata <[email protected]> | 2010-08-27 17:41:53 +0200 |
|---|---|---|
| committer | Petr Machata <[email protected]> | 2010-08-27 17:41:53 +0200 |
| commit | c6538709f0f4f61903c58f95c53ce43f7f8a02e1 (patch) | |
| tree | 900fe51e0dca50c6b8c69bc37af7362e5a387b34 /dwarflint/dwarflint.cc | |
| parent | 71a89f34b4473d3ccb315f36c1bfdd790a42acd2 (diff) | |
dwarflint: Add an ability to list registered checks
- because the check descriptor is quite simple as of now, the usefulness
of this is rather limited
- plus unregistered checks are not listed, which means that the user will
never know about prereqs like .debug_info. Hard to say whether this is
a problem or not
Diffstat (limited to 'dwarflint/dwarflint.cc')
| -rw-r--r-- | dwarflint/dwarflint.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/dwarflint/dwarflint.cc b/dwarflint/dwarflint.cc index 83491ee6..541f00a5 100644 --- a/dwarflint/dwarflint.cc +++ b/dwarflint/dwarflint.cc @@ -81,6 +81,20 @@ dwarflint::check_registrar::enroll (dwarflint &lint) } } +void +dwarflint::check_registrar::list_checks () const +{ + for (std::vector <item *>::const_iterator it = _m_items.begin (); + it != _m_items.end (); ++it) + (*it)->list (); +} + +void +dwarflint::list_check (checkdescriptor const &cd) +{ + std::cout << cd.name << std::endl; +} + namespace { bool |
