jenkinsci / JenkinsPipelineUnit

Framework for unit testing Jenkins pipelines
MIT License
1.55k stars 396 forks source link

Why are call stack items indented with 3 spaces? #641

Closed turboBasic closed 10 months ago

turboBasic commented 10 months ago

I am curious if call stack items are indented with 3 spaces intentionally (eg. for some non-trivial use cases) or it is just an historical artefact and it is kept so for backward compatibility?

I have followed the git log for the line that introduced 3 spaces indentation and see that it exists since the very beginning of the project.

As I believe that majority of people use 2 or 4 spaces indentation this might be an issue when one edits callstack file in IDE (like it had been for me :) ). Not a big deal of course, but maybe it is worth to add one line in documentation which draws attention to this interesting fact ☺️

nre-ableton commented 10 months ago

I don't think there's a specific reason for this, feel free to create a PR if you like.

turboBasic commented 10 months ago

@nre-ableton Thanks for clarifying, I suspected that there are some interesting reasons behind ☺️

I am sure that it should not be changed as it won't be backward-compatible and existing tests will start to fail. I have found a cheap fix - .editorconfig file in a directory containing call stack dumps:

[*.txt]
indent_size = 3