Problem: Editorconfig was configured to strip trailing whitespace in all
file types. This is generally a good thing, but when interactive
rebasing with Git and editing the contents of a commit, trailing
whitespace is significant on blank lines and must be preserved in order
for edits to be applied cleanly.
Solution: Update Editorconfig to exclude *.diff from the strip
whitespace rule, as interactive rebasing edits are done in a temporary
file with a '.diff' suffix.
Problem: we use soft 4-space tabs throughout the Bisq codebase, and the
new makefile is a break to this rule due to make's default requirement
for hard tabs in recipes.
Solution: This commit updates our Editorconfig settings to reflect this
exception.
For vim users, it is also recommended that you add the following entry
to your .vimrc:
au FileType make set tw=72 noet cc=72
It will ensure that you wrap (documentation) lines at 72 chars. It also
sets noexpandtab explicitly. Even though .editorconfig should already be
doing this for you when working in Bisq, this more general vim
configuration will ensure you use tabs correctly in any makefile. The
`cc=72` setting adds a visual right margin at 72 characters.
This commit also updates the existing makefile, wrapping lines of
documentation that had exceeded the 72-char margin.
This is specifically for the gradlew.bat file generated by the `gradle
wrapper` command. Typically, this file should never be edited, but just
in case it is, this configuration will preserve its original CRLF line
endings.
Recent changes to dependencyVerification got committed with 8-space
indentation, causing a diff for the whole block. This reverts it to
4-space, which is what is generated by `gradle -q calculateChecksums`.
IDEA does strips EOF newlines in these files, so this commit adds an
exception to the usual rule about inserting them. This will avoid
spurious whitespace diffs on these files in the future.
This change adds a .idea/codeStyles/Project.xml file that orders all
imports from higher-level layers to lower-level layers, with blank lines
between different major packages.
The purpose of this approach is to allow the reader to scan the imports
in a file efficiently to understand what kind of work the class does,
what layers it touches, and so forth. Keeping imports clean and ordered
by layer can be a powerful tool in keeping a codebase well organized and
tangle-free over time.
bisq.* packages are always sorted at the top.
This change is the result of a global reformatting in IDEA now that
`.editorconfig` settings are in place. Note that Editorconfig's
`continuation_indent_size` property [1] was also added and set to 8
here, as this reflects the dominant style already present in the
codebase. i.e. in created a much smaller diff to set the continuation
indent to 8 that would have been created leaving this property out and
letting it default to 4.
[1]: https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties