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

ruleguard: add support for structured doc comments #227

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

quasilyte
Copy link
Owner

@quasilyte quasilyte commented Apr 28, 2021

A matcher function can now use 4 special pragmas:

* `doc:summary` for a short description
* `doc:before` for an example of a "bad code"
* `doc:after` for a fixed code example
* `doc:tags` for a list of custom tags

It's planned to make it possible for the integrating app
to access that information in a convenient way.

This PR is moslty about enabling on a parsing level.

These 4 fields (summary, before, after, tags) are selected
as something that is close to the go-critic checker documentation model.

@quasilyte quasilyte force-pushed the quasilyte/feature/gorule_docs branch 2 times, most recently from 0193f65 to 057ebee Compare April 28, 2021 20:42
A matcher function can now use 4 special pragmas:

	* `doc:summary` for a short description
	* `doc:before` for an example of a "bad code"
	* `doc:after` for a fixed code example
	* `doc:tags` for a list of custom tags

It's planned to make it possible for the integrating app
to access that information in a convenient way.

This PR is moslty about enabling on a parsing level.

These 4 fields (summary, before, after, tags) are selected
as something that is close to the `go-critic` checker documentation model.
@quasilyte quasilyte force-pushed the quasilyte/feature/gorule_docs branch from 057ebee to 35a5546 Compare April 28, 2021 21:43
@quasilyte quasilyte merged commit 545e0d2 into master Apr 28, 2021
@quasilyte quasilyte deleted the quasilyte/feature/gorule_docs branch April 28, 2021 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant