Matt Martz
87808797ea
Fix flake8 error
8 years ago
Matt Martz
8ca303032f
Clean up and re-order imports
8 years ago
Matt Martz
ef55f9a243
Clarify that RETURN is a form of documentation
8 years ago
Matt Martz
fca2f088ea
Verify that new arguments have a correct version added. Fixes #16
8 years ago
Matt Martz
ab74928259
Fix local variable 'version_added' referenced before assignment. Fixes #15
8 years ago
Matt Martz
f0e769e125
s/Regex/RegEx/
8 years ago
Matt Martz
ccd49201b1
Cast version to string for comparisons
8 years ago
Matt Martz
8daaa75027
Note that sys.exit should be exit_json or fail_json
8 years ago
Matt Martz
e37ba8dd29
Fix bottom import check weirdness
8 years ago
Matt Martz
bc51bb97dd
No RETURN should be an error for new modules
8 years ago
Matt Martz
69ec1e8e6a
Check for requests imports. Fixes #12
8 years ago
Matt Martz
61a49e0420
Only check version correctness on new modules. Fixes #11
8 years ago
Matt Martz
1d2cb3968f
Still look for EXAMPLES and RETURN if DOCUMENTATION is invalid. Fixes #7
8 years ago
Matt Martz
99158a6a89
If no version_added is found, we should assume the string 0.0 instead of the int 0
8 years ago
Matt Martz
8c6c2caf61
Still scan modules with no extension assuming they are python. Fixes #8
8 years ago
Matt Martz
e9de4d136f
Better tab checking, since we care about any tabs in the line, not just in initial indentation
8 years ago
Matt Martz
72690c89bd
Try to parse RETURN as YAML
8 years ago
Matt Martz
2218e763f8
Get the index of the tab, not the line itself
8 years ago
Matt Martz
e3dbe85f25
Check the version_added value
8 years ago
Matt Martz
86c50839bd
We are using enumerate to get line numbers, so we need to add 1 since it is 0 offset
8 years ago
Matt Martz
1464f246a3
Add a version
8 years ago
Matt Martz
cbe7052ebe
get_docstring has changed output, rework code to get exception raised by get_docstring
8 years ago
Matt Martz
4d24f3ba61
Don't abspath things, and don't do root based magic
8 years ago
Matt Martz
2ce2b7a416
Detect duplicate globals from basic.py
8 years ago
Matt Martz
3760ae3bfe
Add option for regex pattern exclusions for file paths
8 years ago
Matt Martz
cf9b22103d
Warnings should not increment the exit status
8 years ago
Matt Martz
95c9e11cba
Give line no and column for indentation
8 years ago
Matt Martz
cb87eeccad
Catch the traceback from get_docstring so we can output it in the correct spot
8 years ago
Matt Martz
6b02c1c261
Print the modules path, so it's easier to go find that module
8 years ago
Matt Martz
48ce4b7d70
Don't trace if we check a non python module for just docs
8 years ago
Matt Martz
d488bd57cc
Don't check docs only files for a proper interpreter line
8 years ago
Matt Martz
117ecc1e9b
Update import for REPLACER_WINDOWS
8 years ago
Matt Martz
da3ce668fa
Check for tabbed indentation
8 years ago
Matt Martz
b794d92991
Update BLACKLISTs
8 years ago
Matt Martz
dcb17e1800
Only run the interpreter check once
8 years ago
Matt Martz
4f9b6899fe
Add some basic support for powershell modules
8 years ago
Matt Martz
0386aa2643
Allow running against a single file
8 years ago
Matt Martz
efd8787e0b
flake8 cleanup
8 years ago
Matt Martz
90c469d8ec
Require some module_utils imports to be at the bottom
8 years ago
Matt Martz
8ff644680d
Check for missing GPLv3 license header in module. Fixes #4
8 years ago
Matt Martz
4c8c0b035f
Check for sys.exit. Fixes #5
8 years ago
Matt Martz
823e3c72d3
Track errors/warnings and exit with a code equal to the total
8 years ago
Matt Martz
b121d202f5
Um, that was dumb, and apparently not tested, good job self.
8 years ago
Matt Martz
58703e47ac
Make module_utils imports not at bottom a warning
8 years ago
Matt Martz
af6dde6eae
Add warning for json import. Fixes #2
8 years ago
Matt Martz
074e4ad47f
rstrip modules path, to prevent some strange scenario with .git
8 years ago
Matt Martz
46670598aa
Add interpreter check. Fixes #1
8 years ago
Matt Martz
f0413bfd45
pep8 cleanup
8 years ago
Toshio Kuratomi
b6c1bcb64d
Some checks that the modules are also python modules
...
* Pull some logic into a Validator base class
* Add a PythonPackageValidator that checks directories are python
packages
* Handle files that have python syntax errors
* Report modules that do not have a .py extension
8 years ago
Matt Martz
7a8862975e
Fix try/except HAS_ logic
8 years ago