pax_global_header00006660000000000000000000000064124241450710014512gustar00rootroot0000000000000052 comment=117c083aa28ac9c801a876d3fbc6197bcc357fc3 python-bashate-0.3.1/000077500000000000000000000000001242414507100144415ustar00rootroot00000000000000python-bashate-0.3.1/.coveragerc000066400000000000000000000001561242414507100165640ustar00rootroot00000000000000[run] branch = True source = bashate omit = bashate/tests/*,bashate/openstack/* [report] ignore-errors = Truepython-bashate-0.3.1/.gitignore000066400000000000000000000007001242414507100164260ustar00rootroot00000000000000*.py[cod] # C extensions *.so # Packages *.egg *.egg-info dist build eggs parts bin var sdist develop-eggs .installed.cfg lib lib64 # Installer logs pip-log.txt # Unit test / coverage reports .coverage .tox nosetests.xml .testrepository # Translations *.mo # Mr Developer .mr.developer.cfg .project .pydevproject # Complexity output/*.html output/*/index.html # Sphinx doc/build # pbr generates these AUTHORS ChangeLog # Editors *~ .*.swppython-bashate-0.3.1/.gitreview000066400000000000000000000001201242414507100164400ustar00rootroot00000000000000[gerrit] host=review.openstack.org port=29418 project=openstack-dev/bashate.git python-bashate-0.3.1/.mailmap000066400000000000000000000001301242414507100160540ustar00rootroot00000000000000# Format is: # # python-bashate-0.3.1/.testr.conf000066400000000000000000000004761242414507100165360ustar00rootroot00000000000000[DEFAULT] test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION test_id_option=--load-list $IDFILE test_list_option=--listpython-bashate-0.3.1/CONTRIBUTING.rst000066400000000000000000000010321242414507100170760ustar00rootroot00000000000000If you would like to contribute to the development of OpenStack, you must follow the steps in the "If you're a developer, start here" section of this page: http://wiki.openstack.org/HowToContribute Once those steps have been completed, changes to OpenStack should be submitted for review via the Gerrit tool, following the workflow documented at: http://wiki.openstack.org/GerritWorkflow Pull requests submitted through GitHub will be ignored. Bugs should be filed on Launchpad, not GitHub: https://bugs.launchpad.net/bash8python-bashate-0.3.1/HACKING.rst000066400000000000000000000002371242414507100162410ustar00rootroot00000000000000bashate Style Commandments =============================================== Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/ python-bashate-0.3.1/LICENSE000066400000000000000000000236361242414507100154600ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. python-bashate-0.3.1/MANIFEST.in000066400000000000000000000001351242414507100161760ustar00rootroot00000000000000include AUTHORS include ChangeLog exclude .gitignore exclude .gitreview global-exclude *.pycpython-bashate-0.3.1/README.rst000066400000000000000000000030171242414507100161310ustar00rootroot00000000000000=============================== bashate =============================== A pep8 equivalent for bash scripts This program attempts to be an automated style checker for bash scripts to fill the same part of code review that pep8 does in most OpenStack projects. It started from humble beginnings in the DevStack project, and will continue to evolve over time. - Free software: Apache license - Documentation: http://docs.openstack.org/developer/bashate - Source: http://git.openstack.org/cgit/openstack-dev/bashate - Bugs: http://bugs.launchpad.net/bash8 Currently Supported Checks -------------------------- Errors ~~~~~~ Basic white space errors, for consistent indenting - E001: check that lines do not end with trailing whitespace - E002: ensure that indents are only spaces, and not hard tabs - E003: ensure all indents are a multiple of 4 spaces - E004: file did not end with a newline Structure Errors ~~~~~~~~~~~~~~~~ A set of rules that help keep things consistent in control blocks. These are ignored on long lines that have a continuation, because unrolling that is kind of "interesting" - E010: *do* not on the same line as *for* - E011: *then* not on the same line as *if* or *elif* - E012: heredoc didn't end before EOF - E020: Function declaration not in format ``^function name {$`` Obsolete and deprecated syntax ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rules to identify obsolete and deprecated syntax that should not be used - E041: Usage of $[ for arithmetic is deprecated for $(( See also ~~~~~~~~ See also :doc:`/man/bashate`. python-bashate-0.3.1/babel.cfg000066400000000000000000000000201242414507100161570ustar00rootroot00000000000000[python: **.py] python-bashate-0.3.1/bashate/000077500000000000000000000000001242414507100160505ustar00rootroot00000000000000python-bashate-0.3.1/bashate/__init__.py000066400000000000000000000011761242414507100201660ustar00rootroot00000000000000# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import pbr.version __version__ = pbr.version.VersionInfo( 'bashate').version_string() python-bashate-0.3.1/bashate/bashate.py000066400000000000000000000203341242414507100200330ustar00rootroot00000000000000#!/usr/bin/env python # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import argparse import fileinput import re import sys def not_continuation(line): return not re.search('\\\\$', line) def check_for_do(line, report): if not_continuation(line): match = re.match('^\s*(for|while|until)\s', line) if match: operator = match.group(1).strip() if operator == "for": # "for i in ..." and "for ((" is bash, but # "for (" is likely from an embedded awk script, # so skip it if re.search('for \([^\(]', line): return if not re.search(';\s*do(\b|$)', line): report.print_error(('E010: Do not on same line as %s' % operator), line) def check_if_then(line, report): if not_continuation(line): if re.search('^\s*(el)?if \[', line): if not re.search(';\s*then(\b|$)', line): report.print_error('E011: Then keyword is not on same line ' 'as if or elif keyword', line) def check_no_trailing_whitespace(line, report): if re.search('[ \t]+$', line): report.print_error('E001: Trailing Whitespace', line) def check_indents(line, report): m = re.search('^(?P[ \t]+)', line) if m: if re.search('\t', m.group('indent')): report.print_error('E002: Tab indents', line) if (len(m.group('indent')) % 4) != 0: report.print_error('E003: Indent not multiple of 4', line) def check_function_decl(line, report): failed = False if line.startswith("function"): if not re.search('^function [\w-]* \{$', line): failed = True else: # catch the case without "function", e.g. # things like '^foo() {' if re.search('^\s*?\(\)\s*?\{', line): failed = True if failed: report.print_error('E020: Function declaration not in format ' '"^function name {$"', line) def starts_multiline(line): m = re.search("[^<]<<\s*(?P\w+)", line) if m: return m.group('token') else: return False def end_of_multiline(line, token): if token: return re.search("^%s\s*$" % token, line) is not None return False def check_arithmetic(line, report): if "$[" in line: report.print_error('E041: Arithmetic expansion using $[ ' 'is deprecated for $((', line) class BashateRun(object): def __init__(self): # TODO(mrodden): rename these to match convention self.ERRORS = 0 self.IGNORE = None def register_ignores(self, ignores): if ignores: self.IGNORE = '^(' + '|'.join(ignores.split(',')) + ')' def should_ignore(self, error): return self.IGNORE and re.search(self.IGNORE, error) def print_error(self, error, line, filename=None, filelineno=None): if self.should_ignore(error): return if not filename: filename = fileinput.filename() if not filelineno: filelineno = fileinput.filelineno() self.ERRORS = self.ERRORS + 1 self.log_error(error, line, filename, filelineno) def log_error(self, error, line, filename, filelineno): print("%s: '%s'" % (error, line.rstrip('\n'))) print(" - %s : L%s" % (filename, filelineno)) def check_files(self, files, verbose): in_multiline = False multiline_start = 0 multiline_line = "" logical_line = "" token = False prev_file = None prev_line = "" prev_lineno = 0 # NOTE(mrodden): magic; replace with proper # report class when necessary report = self for fname in files: for line in fileinput.input(fname): if fileinput.isfirstline(): # if in_multiline when the new file starts then we didn't # find the end of a heredoc in the last file. if in_multiline: report.print_error( 'E012: heredoc did not end before EOF', multiline_line, filename=prev_file, filelineno=multiline_start) in_multiline = False # last line of a previous file should always end with a # newline if prev_file and not prev_line.endswith('\n'): report.print_error( 'E004: file did not end with a newline', prev_line, filename=prev_file, filelineno=prev_lineno) prev_file = fileinput.filename() if verbose: print("Running bashate on %s" % fileinput.filename()) # NOTE(sdague): multiline processing of heredocs is interesting if not in_multiline: logical_line = line token = starts_multiline(line) if token: in_multiline = True multiline_start = fileinput.filelineno() multiline_line = line continue else: logical_line = logical_line + line if not end_of_multiline(line, token): continue else: in_multiline = False # Don't run any tests on comment lines if logical_line.lstrip().startswith('#'): prev_line = logical_line prev_lineno = fileinput.filelineno() continue # Strip trailing comments. From bash: # # a word beginning with # causes that word and all # remaining characters on that line to be ignored. # ... # A character that, when unquoted, separates # words. One of the following: | & ; ( ) < > space # tab # # for simplicity, we strip inline comments by # matching just '#'. ll_split = logical_line.split(' #', 1) if len(ll_split) > 1: logical_line = ll_split[0].rstrip() check_no_trailing_whitespace(logical_line, report) check_indents(logical_line, report) check_for_do(logical_line, report) check_if_then(logical_line, report) check_function_decl(logical_line, report) check_arithmetic(logical_line, report) prev_line = logical_line prev_lineno = fileinput.filelineno() def main(): parser = argparse.ArgumentParser( description='A bash script style checker') parser.add_argument('files', metavar='file', nargs='*', help='files to scan for errors') parser.add_argument('-i', '--ignore', help='Rules to ignore') parser.add_argument('-v', '--verbose', action='store_true', default=False) opts = parser.parse_args() files = opts.files if not files: parser.print_usage() return 1 run = BashateRun() run.register_ignores(opts.ignore) try: run.check_files(files, opts.verbose) except IOError as e: print("bashate: %s" % e) return 1 if run.ERRORS > 0: print("%d bashate error(s) found" % run.ERRORS) return 1 else: return 0 if __name__ == "__main__": sys.exit(main()) python-bashate-0.3.1/bashate/tests/000077500000000000000000000000001242414507100172125ustar00rootroot00000000000000python-bashate-0.3.1/bashate/tests/__init__.py000066400000000000000000000000001242414507100213110ustar00rootroot00000000000000python-bashate-0.3.1/bashate/tests/base.py000066400000000000000000000035551242414507100205060ustar00rootroot00000000000000# Copyright 2010-2011 OpenStack Foundation # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import os import fixtures import testtools _TRUE_VALUES = ('True', 'true', '1', 'yes') class TestCase(testtools.TestCase): """Test case base class for all unit tests.""" def setUp(self): """Run before each test method to initialize test environment.""" super(TestCase, self).setUp() test_timeout = os.environ.get('OS_TEST_TIMEOUT', 0) try: test_timeout = int(test_timeout) except ValueError: # If timeout value is invalid do not set a timeout. test_timeout = 0 if test_timeout > 0: self.useFixture(fixtures.Timeout(test_timeout, gentle=True)) self.useFixture(fixtures.NestedTempfile()) self.useFixture(fixtures.TempHomeDir()) if os.environ.get('OS_STDOUT_CAPTURE') in _TRUE_VALUES: stdout = self.useFixture(fixtures.StringStream('stdout')).stream self.useFixture(fixtures.MonkeyPatch('sys.stdout', stdout)) if os.environ.get('OS_STDERR_CAPTURE') in _TRUE_VALUES: stderr = self.useFixture(fixtures.StringStream('stderr')).stream self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr)) self.log_fixture = self.useFixture(fixtures.FakeLogger()) python-bashate-0.3.1/bashate/tests/samples/000077500000000000000000000000001242414507100206565ustar00rootroot00000000000000python-bashate-0.3.1/bashate/tests/samples/E001_bad.sh000066400000000000000000000000501242414507100224200ustar00rootroot00000000000000#!/bin/bash # E001 somefunction args python-bashate-0.3.1/bashate/tests/samples/E002_bad.sh000066400000000000000000000000451242414507100224250ustar00rootroot00000000000000#!/bin/bash echo "E002: Has a tab" python-bashate-0.3.1/bashate/tests/samples/E011_bad.sh000066400000000000000000000001201242414507100224170ustar00rootroot00000000000000#!/bin/bash if [ 0 ] then zero elif [ 1 ] then one else default fi python-bashate-0.3.1/bashate/tests/samples/E041_bad.sh000066400000000000000000000000431242414507100224260ustar00rootroot00000000000000#!/bin/bash # E021 foo=$[ 1 + 1 ] python-bashate-0.3.1/bashate/tests/samples/comments.sh000066400000000000000000000004351242414507100230410ustar00rootroot00000000000000#!/bin/bash # make sure we're ignoring comments correctly ## multiple # if [ foo ]; # then # echo "blah" # fi foo=1 # `test` if [ foo ]; then # hello echo "hi" fi if [ foo ]; then ## hello ## echo "hi" fi # ``RST style comment`` # ``indented comment`` # tab comment python-bashate-0.3.1/bashate/tests/samples/for_loops.sh000066400000000000000000000006001242414507100232100ustar00rootroot00000000000000# for loop examples # pass for i in $(seq 1 5); do echo $i done # pass for (( i = 0 ; i < 5 ; i++ )); do echo $i done # fail E010 for i in $(seq 1 5); do echo $i done # fail E010 for (( i = 0 ; i < 5 ; i++ )); do echo $i done # should ignore "for (" [note single parenthesis] as it is likely awk awk '{ for (i = 1; i < 5; i++) print $i }' < /dev/null python-bashate-0.3.1/bashate/tests/samples/legacy_sample.sh000066400000000000000000000005761242414507100240270ustar00rootroot00000000000000#!/bin/bash # E020 function somefunction () { echo "E002: Has a tab" echo "E003: Not an indent with multiple of 4" } # E001 somefunction args # E010 for thing in things do run_things thing done while 0 do run_thing done until 1 do run_thing done # E011 if [ 0 ] then run_morethings else run_otherthings fi # E012 cat < [files...] DESCRIPTION =========== The :program:`bashate` command line utility is a style-checker for bash scripts. The name is derived from :program:`pep8`, a Python lint-type tool. OPTIONS ======= --help, -h Print help --verbose, -v Verbose output --ignore, -I Tests to ignore, comma separated EXAMPLES ======== Run all tests on a single file:: bashate file.sh Run tests on several files, while also ignoring several errors:: bashate -I E010,E011 file.sh file2.sh BUGS ==== http://bugs.launchpad.net/bash8 python-bashate-0.3.1/doc/source/readme.rst000066400000000000000000000000361242414507100204740ustar00rootroot00000000000000.. include:: ../../README.rst python-bashate-0.3.1/doc/source/usage.rst000066400000000000000000000001101242414507100203340ustar00rootroot00000000000000======== Usage ======== To use bashate in a project:: import bashate python-bashate-0.3.1/openstack-common.conf000066400000000000000000000002051242414507100205620ustar00rootroot00000000000000[DEFAULT] # The list of modules to copy from oslo-incubator.git # The base module to hold the copy of openstack.common base=bashatepython-bashate-0.3.1/pylintrc000066400000000000000000000016561242414507100162400ustar00rootroot00000000000000# The format of this file isn't really documented; just use --generate-rcfile [Messages Control] # C0111: Don't require docstrings on every method # W0511: TODOs in code comments are fine. # W0142: *args and **kwargs are fine. # W0622: Redefining id is fine. disable=C0111,W0511,W0142,W0622 [Basic] # Variable names can be 1 to 31 characters long, with lowercase and underscores variable-rgx=[a-z_][a-z0-9_]{0,30}$ # Argument names can be 2 to 31 characters long, with lowercase and underscores argument-rgx=[a-z_][a-z0-9_]{1,30}$ # Method names should be at least 3 characters long # and be lowercased with underscores method-rgx=([a-z_][a-z0-9_]{2,50}|setUp|tearDown)$ [Design] max-public-methods=100 min-public-methods=0 max-args=6 [Variables] # List of additional names supposed to be defined in builtins. Remember that # you should avoid to define new builtins when possible. # _ is used by our localization additional-builtins=_ python-bashate-0.3.1/requirements.txt000066400000000000000000000003751242414507100177320ustar00rootroot00000000000000# The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. pbr>=0.6,!=0.7,<1.0 argparse Babel>=0.9.6 python-bashate-0.3.1/setup.cfg000066400000000000000000000023351242414507100162650ustar00rootroot00000000000000[metadata] name = bashate summary = A pep8 equivalent for bash scripts description-file = README.rst author = OpenStack author-email = openstack-dev@lists.openstack.org home-page = http://www.openstack.org/ classifier = Environment :: OpenStack Intended Audience :: Information Technology Intended Audience :: System Administrators License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python Programming Language :: Python :: 2 Programming Language :: Python :: 2.7 Programming Language :: Python :: 2.6 Programming Language :: Python :: 3 Programming Language :: Python :: 3.3 Programming Language :: Python :: 3.4 [files] packages = bashate [entry_points] console_scripts = bashate = bashate.bashate:main [build_sphinx] source-dir = doc/source build-dir = doc/build all_files = 1 [upload_sphinx] upload-dir = doc/build/html [compile_catalog] directory = bashate/locale domain = bashate [update_catalog] domain = bashate output_dir = bashate/locale input_file = bashate/locale/bashate.pot [extract_messages] keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg output_file = bashate/locale/bashate.pot python-bashate-0.3.1/setup.py000077500000000000000000000014151242414507100161570ustar00rootroot00000000000000#!/usr/bin/env python # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. # See the License for the specific language governing permissions and # limitations under the License. # THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT import setuptools setuptools.setup( setup_requires=['pbr'], pbr=True) python-bashate-0.3.1/test-requirements.txt000066400000000000000000000006231242414507100207030ustar00rootroot00000000000000# The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. hacking>=0.9.2,<0.10 pylint==0.25.2 mock>=1.0 coverage>=3.6 discover fixtures>=0.3.14 python-subunit sphinx>=1.1.2 oslosphinx testrepository>=0.0.17 testscenarios>=0.4,<0.5 testtools>=0.9.32 python-bashate-0.3.1/tox.ini000066400000000000000000000015051242414507100157550ustar00rootroot00000000000000[tox] minversion = 1.6 envlist = py26,py27,py33,py34,pypy,pep8 skipsdist = True [testenv] usedevelop = True install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = python setup.py testr --slowest --testr-args='{posargs}' [testenv:pep8] commands = flake8 [testenv:pylint] commands = pylint bashate [testenv:docs] commands = python setup.py build_sphinx [testenv:venv] commands = {posargs} [testenv:cover] commands = python setup.py testr --coverage --testr-args='{posargs}' [flake8] # H803 skipped on purpose per list discussion. # E123, E125 skipped as they are invalid PEP-8. show-source = True ignore = E123,E125,H803 builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build