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

docs: add step-by-step guide that describes how to add new checker #116

Closed
quasilyte opened this issue May 26, 2018 · 4 comments
Closed
Labels
help wanted Extra attention is needed release blocker

Comments

@quasilyte
Copy link
Member

quasilyte commented May 26, 2018

In short, the process is like:

  1. Come up with checker idea. Concentrate on what it checks.
  2. Select one of the base checkers kind (example: expr checker, stmt checker, etc.).
  3. Define checker type and constructor function.
  4. Add entry to checkers list in lint.go. It could be a good idea to mark recently added checker as experimental.
  5. Add test directory that is named after the checker in cmd/kfulint/testdata.
  6. Add checker_tests.go file in that directory and add some positive and negative tests there.
  7. Run tests. They must fail as your checker does not check anything yet. Tests can be run with
    go test -v github.com/PieselBois/kfulint/cmd/kfulint.
  8. Implement checker itself. Make tests pass.
@weeellz
Copy link
Contributor

weeellz commented Jun 4, 2018

@quasilyte, where should this guide be? In contributing.org or in separate file?

@quasilyte
Copy link
Member Author

Tough question.
I think either way is fine.
As soon as we get good content it will be trivial to move it around.

By the way, are you OK with org files?
Does your editor support them?

@quasilyte
Copy link
Member Author

I suggest assigning @tengufromsky for this doc review.
He can check if it can be understood by someone who is not very familiar with our project.

@weeellz weeellz self-assigned this Jun 4, 2018
@weeellz
Copy link
Contributor

weeellz commented Jun 4, 2018

@quasilyte, yup, org files is ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed release blocker
Projects
None yet
Development

No branches or pull requests

3 participants