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

Add tk lint command #592

Merged
merged 6 commits into from
May 9, 2022
Merged

Add tk lint command #592

merged 6 commits into from
May 9, 2022

Conversation

julienduchesne
Copy link
Member

@julienduchesne julienduchesne commented Aug 6, 2021

Like fmt, this takes a list of dirs/files as argument and evaluates them with the go-jsonnet lint utility
The linting results are directly printed out to stderr
If there are any linting errors, the command exit with status code 1
Closes #342

)

// FindFiles takes a file / directory and finds all Jsonnet files
func FindFiles(target string, excludes []glob.Glob) ([]string, error) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely unchanged from where I took it in the format.go file

@julienduchesne julienduchesne marked this pull request as ready for review August 6, 2021 01:22
@julienduchesne
Copy link
Member Author

There is still an issue with panics in go-jsonnet: google/go-jsonnet#544 but this is ready to review as far as the tanka side goes. When it doesn't encounter the panic (in specific cases), it works well
@sbarzowski, this may interest you also

@sbarzowski
Copy link

It's nice to see tk lint coming along :-).

Regarding the panic, it's close to the top of my list now.

@stale
Copy link

stale bot commented Sep 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 19, 2021
@stale stale bot removed the stale label Oct 4, 2021
@julienduchesne julienduchesne marked this pull request as draft October 4, 2021 13:43
@julienduchesne
Copy link
Member Author

Marked as keepalive and draft while we wait for go-jsonnet's next release

@Duologic Duologic removed their request for review October 8, 2021 14:01
@julienduchesne julienduchesne removed the request for review from sh0rez October 14, 2021 01:03
@julienduchesne julienduchesne marked this pull request as ready for review January 25, 2022 19:05
Like `fmt`, this takes a list of dirs/files as argument and evaluates them with the go-jsonnet lint utility
The linting results are directly printed out to stderr
If there are any linting errors, the command exit with status code 1
#342
The VM creation is duplicated but the impact seems pretty minimal
With 4 workers, it's still roughly twice as previously on my very unpowered machine
@xvzf
Copy link
Contributor

xvzf commented Feb 19, 2022

Bump here :) This would be pretty amazing!

@julienduchesne julienduchesne requested review from sh0rez, Duologic and a team April 25, 2022 12:50
Copy link
Contributor

@jjo jjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!, thanks for this :)

@julienduchesne julienduchesne merged commit 6305450 into main May 9, 2022
@julienduchesne julienduchesne deleted the julienduchesne/tk-lint branch May 9, 2022 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tk lint ?
5 participants