-
Notifications
You must be signed in to change notification settings - Fork 113
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
lint,cmd/kfulint: record types info and parsed ast files inside context #5
Comments
Is it necessary for us to handle packages? Right now we don't have ( in plan ) any linters that would need any package information ( as far as i know ). So, maybe we would process every file independently? (Maybe not use parsedir at all, but use parsefile) |
Yes, we can ignore that detail and operate on file level. |
#7 solved that. |
quasilyte
pushed a commit
that referenced
this issue
Jun 12, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
ast.ParseDir
results are ignored.It returns multiple packages, usually it's target package (same name as containing directory name) only,
but sometimes there is also testing package with
_test
suffix.Proposed plan:
Note: we may reject multi-package folders for now.
In other words: it's OK to exit if
len(packages) != 1
and that package name does notmatch target package name. "proper" multi-package handling may be added later.
This can simplify initial implementation significantly.
lint.Context
needs additional fields.It definitely needs
*types.Info
and[]*ast.File
. Maybe something else.The text was updated successfully, but these errors were encountered: