diff options
Diffstat (limited to 'src/scripts')
-rwxr-xr-x | src/scripts/ci_build.py | 24 | ||||
-rw-r--r-- | src/scripts/indent.el | 55 |
2 files changed, 15 insertions, 64 deletions
diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py index d2b83fd5e..27ffc9f3c 100755 --- a/src/scripts/ci_build.py +++ b/src/scripts/ci_build.py @@ -213,7 +213,7 @@ def run_cmd(cmd, root_dir): time_taken = int(time.time() - start) - if time_taken > 2: + if time_taken > 10: print("Ran for %d seconds" % (time_taken)) if proc.returncode != 0: @@ -344,6 +344,14 @@ def main(args=None): if not use_python2 and not use_python3: raise Exception('No python interpreters found cannot lint') + pylint_rc = '--rcfile=%s' % (os.path.join(root_dir, 'src/configs/pylint.rc')) + pylint_flags = [pylint_rc, '--reports=no', '--score=no'] + + # Some disabled rules specific to Python2 + # superfluous-parens: needed for Python3 compatible print statements + # too-many-locals: variable counting differs from pylint3 + py2_flags = '--disable=superfluous-parens,too-many-locals' + py_scripts = [ 'configure.py', 'src/python/botan2.py', @@ -356,14 +364,10 @@ def main(args=None): target_path = os.path.join(root_dir, target) if use_python2: - # Some disabled rules specific to Python2 - # superfluous-parens: needed for Python3 compatible print statements - # too-many-locals: variable counting differs from pylint3 - py2_flags = '--disable=superfluous-parens,too-many-locals' - cmds.append(['python2', '-m', 'pylint', py2_flags, target_path]) + cmds.append(['python2', '-m', 'pylint'] + pylint_flags + [py2_flags, target_path]) if use_python3: - cmds.append(['python3', '-m', 'pylint', target_path]) + cmds.append(['python3', '-m', 'pylint'] + pylint_flags + [target_path]) else: config_flags, run_test_command, make_prefix = determine_flags( @@ -441,14 +445,16 @@ def main(args=None): cmds.append(['lcov', '--list', cov_file]) if have_prog('coverage'): - cmds.append(['coverage', 'run', '--branch', botan_py]) + cmds.append(['coverage', 'run', '--branch', + '--rcfile', os.path.join(root_dir, 'src/configs/coverage.rc'), + botan_py]) if have_prog('codecov'): # If codecov exists assume we are on Travis and report to codecov.io cmds.append(['codecov']) else: # Otherwise generate a local HTML report - cmds.append(['genhtml', 'cov.info', '--output-directory', 'lcov-out']) + cmds.append(['genhtml', cov_file, '--output-directory', 'lcov-out']) for cmd in cmds: if options.dry_run: diff --git a/src/scripts/indent.el b/src/scripts/indent.el deleted file mode 100644 index 7fa2540b0..000000000 --- a/src/scripts/indent.el +++ /dev/null @@ -1,55 +0,0 @@ -; This Emacs Lips code defines the indentation style used in Botan. If doesn't -; get everything perfectly correct, but it's pretty close. Copy this code into -; your .emacs file, or use M-x eval-buffer. Make sure to also set -; indent-tabs-mode to nil so spaces are inserted instead. -; -; This style is basically Whitesmiths style with 3 space indents (the Emacs -; "whitesmith" style seems more like a weird Whitesmiths/Allman mutant style). -; -; To activate using this style, open the file you want to edit and run this: -; M-x c-set-style <RET> and then enter "botan". - -(setq botan-style '( - (c-basic-offset . 3) - (c-comment-only-line-offset . 0) - (c-offsets-alist - (c . 0) - (comment-intro . 0) - - (statement-block-intro . 0) - (statement-cont . +) - - (substatement . +) - (substatement-open . +) - - (block-open . +) - (block-close . 0) - - (defun-open . +) - (defun-close . 0) - (defun-block-intro . 0) - (func-decl-cont . +) - - (class-open . +) - (class-close . +) - (inclass . +) - (access-label . -) - (inline-open . +) - (inline-close . 0) - - (extern-lang-open . 0) - (extern-lang-close . 0) - (inextern-lang . 0) - - (statement-case-open +) - - (namespace-open . 0) - (namespace-close . 0) - (innamespace . 0) - - (label . 0) - ) -)) - -(add-hook 'c++-mode-common-hook - (function (lambda () (c-add-style "botan" botan-style nil)))) |