Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce cyclomatic complexity of ProjectConfig.ValidateProjectScripts() #105

Open
febbraro opened this issue Oct 29, 2017 · 2 comments
Open

Comments

@febbraro
Copy link
Member

febbraro commented Oct 29, 2017

Our new static analysis tooling identified ProjectConfig.ValidateProjectScripts as failing on cyclomatic complexity. That's a fancy phrase for "too much nesting of logic/too much code in one function".

HELP WANTED
This issue is a great opportunity to learn Golang, the contribution workflow of rig, and incidentally improve rig!

Notes

Adding a Library
docker-compose run --rm base
dep ensure --add github.com/awesome/lib

Testing

  • Use docker-compose run --rm lint to apply the full suite of static analysis tools. If there is a failure, you aren't done yet!
  • Use docker-compose run --rm compile to confirm your code compiles.
  • You can use the binary resulting from the compilation step (located in ./build/darwin/rig) to test that validation works... navigate to a project, reference this binary instead of your global rig, and see how rig project help works.
@grayside
Copy link
Contributor

Expanded the initial note into a full new contributor orientation.

@grayside
Copy link
Contributor

Note that #90 points out a problem with the current error logging: namely that it can interference with the output of completely unrelated commands. That is not necessarily in scope here but refactoring should keep in mind that we'd prefer to give the caller more control over when & how this logging happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants