This depends a little bit on the project and the language. Most of our projects have linters available, so do make use of those.
If unsure on how to format a specific statement, try to look for examples in the code.
No trailing whitespace
Avoid really long lines where possible (>120 characters)
Single newline at the end of each file
This is easy, simply use Gofmt.
Python code should follow the PEP 8 style guide.
ShellCheck is used to lint shell code.
Projects like Cockpit Composer use eslint to enforce style.