skx / marionette

Something like puppet, for the localhost only.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code quality improvements

skx opened this issue · comments

The last few commits to master were focused on reducing the code-complexity - specifically those reports on the goreportcard:

The site is down at the moment, but the complexity score of >15 is handled via gocyclo. I can use that to confirm I've fixed things.

In addition to the complexity issues I see that some modules aren't tested at 100%, and some not at all.

  • Update the parser-test at least since that is achingly close to 100% coverage.
  • Add some simple end-to-end tests of file, edit, etc modules.
    • ideally each of our modules should have at least one test-case.
    • but that can wait.

Easy wins should be easy, for example the lexer can be updated to use a lookup table for the majority of its token-types.