Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def fetch_checks(cfg):
base = [
checks.CheckValidity(cfg),
checks.CheckTrailingWhitespace(cfg),
checks.CheckIndentationNoTab(cfg),
checks.CheckCarriageReturn(cfg),
checks.CheckMaxLineLength(cfg),
checks.CheckNewlineEndOfFile(cfg),
]
mgr = extension.ExtensionManager(
namespace="doc8.extension.check", invoke_on_load=True, invoke_args=(cfg.copy(),)
)
addons = []
for e in mgr:
addons.append(e.obj)
return base + addons
def __init__(self, cfg):
super(CheckNewlineEndOfFile, self).__init__(cfg)