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

Lint command to validate project markup. #309

Closed
agile opened this issue Nov 2, 2020 · 5 comments · Fixed by #422
Closed

Lint command to validate project markup. #309

agile opened this issue Nov 2, 2020 · 5 comments · Fixed by #422

Comments

@agile
Copy link
Contributor

agile commented Nov 2, 2020

re: https://docs.looker.com/reference/api-and-integration/api-reference/v3.1/project#validate_project

It'd be very nice to be able to perform the same lint check you can do in the UI by clicking the "Code Validator" button via the CI/CD process.

@joshtemple
Copy link
Collaborator

I've looked at this before but was unclear what benefit adding this to Spectacles brings since you have to pass this check to commit code in the Looker IDE.

Are you deploying LookML that's not going through that validation step in the IDE?

@agile
Copy link
Contributor Author

agile commented Nov 2, 2020

Correct, well I do anyway: often creating/editing files and pushing the changes from outside the UI. Others that do tend to work though the UI don't always remember to validate their changes before opening a PR and possibly merging in broken changes.

I guess the real question is why we don't have that setting better configured, I'll have to follow up with my team mates to figure out if there was some reason we don't have it set to require errors to be fixed.

@zephschafer
Copy link

zephschafer commented Jan 4, 2022

I just wanted to +1 this issue as it's something we would like to have as well.

In response to the comments above. I also just want to note the following:

  • We do sometimes commit code from outside the IDE
  • Even within the IDE, validation may pass on one project from which the commit is made, but fail on another project for which the given project is a dependency
  • Even if committed straightforwardly from the IDE where the developer saw it pass validation, having the feature from Spectacles would help to confirm that validation succeeds on the branch for a reviewer outside of Looker's IDE

So the lint validation would be quite valuable. (I saw it noted as coming soon. Is there a timeline for this?)

@joshtemple
Copy link
Collaborator

We've got this work done (see #422), we just need to add some tests and get it merged and it will go out in the next release. Should be done this month.

@zephschafer
Copy link

Awesome! Thank you!

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 a pull request may close this issue.

3 participants