Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""Go on a power trip by nitpicking the scikit-bio repo.
Attempts to find things that are wrong with the repo -- these are usually
annoying details introduced by human error. The code goes out of its way
to nitpick as much as possible in order to maximize the effectiveness of
the power trip.
Returns
-------
int
Return code: 0 if there were no validation errors, 1 otherwise. Useful
as an exit code (e.g. for use with ``sys.exit``).
"""
root = 'skbio'
validators = [InitValidator(), CopyrightHeadersValidator(),
ExecPermissionValidator(), GeneratedCythonValidator(),
APIRegressionValidator()]
return_code = 0
for validator in validators:
success, msg = validator.validate(root)
if not success:
return_code = 1
sys.stderr.write('\n'.join(msg))
sys.stderr.write('\n\n')
return return_code