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

Normalize source indentation #134

Merged
merged 2 commits into from
Oct 13, 2023

Conversation

Bananeweizen
Copy link
Contributor

The AssertJ source blocks are taken from real code, which is indented as usual in an IDE. To avoid the source snippets use that (somewhat random) indentation in the documentation afterwards, the indentation of each source block needs to be set to zero.
While that is currently done on each block separately, it is less error-prone by using the globally available attribute.

Be aware I have not been able to build this locally due to a restrictive company proxy setup, but I'm using the same setting in another Maven based project, and it works well.

@scordio scordio self-assigned this Oct 6, 2023
@scordio
Copy link
Member

scordio commented Oct 10, 2023

Sorry for the slow feedback, @Bananeweizen!

While that is currently done on each block separately, it is less error-prone by using the globally available attribute.

You mean that:

[source,java,indent=0]

could become:

[source,java]

right?

I tink it would make sense to cleanup unnecessary configurations together with the introduction of the global flag. Would you have time for it? Otherwise, we can take it over.

The AssertJ source blocks are taken from real code, which is indented as
usual in an IDE. To avoid the source snippets use that (somewhat random)
indentation in the documentation afterwards, the indentation of each
source block needs to be set to zero.
While that is currently done on each block separately, it is less
error-prone by using the globally available attribute.
The indentation attribute is now set globally, therefore it is not
needed anymore at each source block.
@Bananeweizen Bananeweizen force-pushed the normalize_indentation branch from 8155460 to ca4f844 Compare October 13, 2023 05:23
@Bananeweizen
Copy link
Contributor Author

@scordio Yes, that's exactly what I meant. I've rebased and added a second commit for the cleanup. Feel free to squash or otherwise change.

@scordio scordio merged commit 67850fd into assertj:main Oct 13, 2023
@scordio
Copy link
Member

scordio commented Oct 13, 2023

Thanks, @Bananeweizen!

@Bananeweizen Bananeweizen deleted the normalize_indentation branch October 13, 2023 17:56
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.

2 participants