guykisel / inline-plz Goto Github PK
View Code? Open in Web Editor NEWInline your lint messages
License: ISC License
Inline your lint messages
License: ISC License
sometimes there are new problems in code that's outside the direct diff, but are a result of the new changes. we could diff the reported lint issues against lint issues from older commits to detect these new problems.
pre-commit
does a nice job of this.
this will allow install
, run
, etc to be functions that can apply more intelligent behavior
the jenkins github pull request plugin makes a bunch of pull request envvars available, so we shouldn't force users to input them explicitly.
need to fix travis.yml to run inline-plz in the different interpreters too
00:03:50.131 Traceback (most recent call last):
00:03:50.131 File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
00:03:50.131 "__main__", fname, loader, pkg_name)
00:03:50.131 File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
00:03:50.131 exec code in run_globals
00:03:50.131 File "/usr/local/lib/python2.7/dist-packages/inlineplz/main.py", line 76, in <module>
00:03:50.131 exit(main())
00:03:50.132 File "/usr/local/lib/python2.7/dist-packages/inlineplz/main.py", line 29, in main
00:03:50.132 return inline(args)
00:03:50.132 File "/usr/local/lib/python2.7/dist-packages/inlineplz/main.py", line 56, in inline
00:03:50.132 messages = linters.lint(args.install)
00:03:50.132 File "/usr/local/lib/python2.7/dist-packages/inlineplz/linters/__init__.py", line 57, in lint
00:03:50.134 output = subprocess.check_output(config.get('run')).decode('utf-8')
00:03:50.134 File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
00:03:50.134 process = Popen(stdout=PIPE, *popenargs, **kwargs)
00:03:50.134 File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
00:03:50.134 errread, errwrite)
00:03:50.134 File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
00:03:50.134 raise child_exception
00:03:50.134 OSError: [Errno 2] No such file or directory
for renamed files, the diff shows a + for every single line, but github's PR diff is smart enough to recognize renamed files.
Message:
Path: node_modules/stylint/node_modules/yargs/node_modules/cliui/node_modules/wordwrap/test/idleness.txt
Line number: 19
Content: set([u'rflint: Line is too long (exceeds 250 characters) (LineTooLong)'])
if CI envvars (jenkins/travis/etc) are present, then automatically look up the current console log, find linter command line invocations, and parse them.
It shouldn't be necessary to run:
pip install -r requirements_dev.txt
Instead, setup.py develop
should include these requirements as well
Ran into this- locally I have missing semicolon issue:
λ npm test
jshint . && jscs .
commands.js: line 295, col 87, Missing semicolon.
commands.js: line 554, col 2, Missing semicolon.
2 errors
npm ERR! Test failed. See above for more details.
doing something like jshint . | inline-plz <args>
would be pretty neat.
--automatic
mode
for example, if the repo contains .py files, automatically run prospector even if there isn't a prospector config
To reproduce:
Commit a change that adds or removes a non-ascii character. (e.g. a copyright sign ©)
Create a PR and run inline-plz on it
Result:
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/jenkins/workspace/inline_pull_request_comments/inline-env/lib/python2.7/site-packages/inlineplz-0.10.0-py2.7.egg/inlineplz/main.py", line 130, in <module>
exit(main())
File "/jenkins/workspace/inline_pull_request_comments/inline-env/lib/python2.7/site-packages/inlineplz-0.10.0-py2.7.egg/inlineplz/main.py", line 46, in main
return inline(args)
File "/jenkins/workspace/inline_pull_request_comments/inline-env/lib/python2.7/site-packages/inlineplz-0.10.0-py2.7.egg/inlineplz/main.py", line 115, in inline
args.url
File "/jenkins/workspace/inline_pull_request_comments/inline-env/local/lib/python2.7/site-packages/inlineplz-0.10.0-py2.7.egg/inlineplz/interfaces/stash.py", line 30, in __init__
self.diff = git.diff(self.parent_sha, self.last_sha)
File "/jenkins/workspace/inline_pull_request_comments/inline-env/local/lib/python2.7/site-packages/inlineplz-0.10.0-py2.7.egg/inlineplz/util/git.py", line 15, in diff
).strip().decode('utf-8')
File "/jenkins/workspace/inline_pull_request_comments/inline-env/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa9 in position 26782: invalid start byte
Build step 'Execute shell' marked build as failure
using encrypted tokens in travis.yml won't work for PRs from forks :(
might be able to dynamically grab a token from the travis API
00:09:58.494 Traceback (most recent call last):
00:09:58.494 File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
00:09:58.494 "__main__", fname, loader, pkg_name)
00:09:58.495 File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
00:09:58.495 exec code in run_globals
00:09:58.495 File "/usr/local/lib/python2.7/dist-packages/inlineplz/main.py", line 78, in <module>
00:09:58.495 exit(main())
00:09:58.495 File "/usr/local/lib/python2.7/dist-packages/inlineplz/main.py", line 31, in main
00:09:58.495 return inline(args)
00:09:58.495 File "/usr/local/lib/python2.7/dist-packages/inlineplz/main.py", line 65, in inline
00:09:58.495 my_interface = interfaces.INTERFACES[args.interface](
00:09:58.495 KeyError: None
not really sure if this is actually feasible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.