CCI-MOC / hil

Hardware Isolation Layer, formerly Hardware as a Service
Apache License 2.0
24 stars 54 forks source link

Use more static analysis tools #743

Open zenhack opened 7 years ago

zenhack commented 7 years ago

There are a number of tools out there that can be used to catch stupid mistakes, dubious constructs, and other mundane but important issues. We should be using them. Off the top of my head:

We've been using pep8 for a while. MyPy is the only one of these where integration may be a bit tricky; I like the idea behind it, but the particulars of the type system they've constructed rule out a lot of very reasonable python idioms, and it's a bit awkward when your dependencies don't use it.

Pylint is very noisy, and integrating it is probably going to mean turning off some warnings at least at first, and turning them back on as we fix things.

xuhang57 commented 6 years ago

pep8 -> pycodestyle.

naved001 commented 6 years ago

@zenhack what do you think of coveralls? It will force users to write tests every time new code is added. Though, we can make it optional and not required for making the merge button green.

zenhack commented 6 years ago

Adding something that does test coverage to this list seems like a good idea to me. I haven't used coveralls before, so can't comment on it as a specific tool, but would not be opposed.

xuhang57 commented 6 years ago

do we really need pyflakes along with pylint?

zenhack commented 6 years ago

Probably not, the list was more brainstorming than anything else. I'm fine skipping that one.