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

fmt: format load strings in tests #282

Conversation

MichaHoffmann
Copy link
Contributor

Adds a small tool so we can auto-format indentation for load statements.

@MichaHoffmann MichaHoffmann force-pushed the mhoffm-autoformat-load-directives branch 7 times, most recently from ba092b5 to daeac04 Compare May 31, 2023 18:34
Copy link
Member

@saswatamcode saswatamcode left a comment

Choose a reason for hiding this comment

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

Nice!

We should probably hook this into our CI as well, by adding it to format target.

ci/loadvet/main.go Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Maybe making this into its own module, so that it is separately installable might be better, in case we want to upstream it for use in prometheus/prometheus at some point? 🙂

ci/loadvet/main.go Outdated Show resolved Hide resolved
Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

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

Maybe we can to run this during CI and error out if there are any changes after running this tool?

@fpetkovski
Copy link
Collaborator

Running it in the CI seems like a good idea 👍

@MichaHoffmann MichaHoffmann force-pushed the mhoffm-autoformat-load-directives branch from daeac04 to d078d7b Compare June 8, 2024 08:48
@MichaHoffmann
Copy link
Contributor Author

Running it in the CI seems like a good idea 👍

hooked it up to the "format" job

@MichaHoffmann MichaHoffmann force-pushed the mhoffm-autoformat-load-directives branch 5 times, most recently from 12d908c to 2bf59ad Compare June 8, 2024 09:02
@MichaHoffmann MichaHoffmann force-pushed the mhoffm-autoformat-load-directives branch 4 times, most recently from 9111740 to 0d9c7d7 Compare June 8, 2024 09:16
* added small tool to automatically format tests
* reformatted all tests

Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
@MichaHoffmann MichaHoffmann force-pushed the mhoffm-autoformat-load-directives branch from 0d9c7d7 to a059bcd Compare June 8, 2024 13:48
@MichaHoffmann MichaHoffmann merged commit 594b459 into thanos-io:main Jun 9, 2024
7 checks passed
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.

None yet

4 participants