config
config copied to clipboard
render option to configure indentation characters
So far, 4 spaces have been hardcoded with no ways to change it
Seems simple and useful. Do you have time to add a unit test that changes the indentation ? I'd look for the existing tests for render and add another one alongside that uses different indentation.
I would try adding tests, but, as of now, I can't even run tests on master
without my changes. Looks like some of them fail due to CRLF issues as my platform is Windows:
- Quoted("hello\nworld")
+ Quoted("hello\r\nworld")
Others have cross-version Scala issues:
expected:<List( Before)> but was:<Buffer( Before
Do I need to do anything additional to pass the standard tests first?
If you can run tests and at least some of them pass, then you could add new tests, make those new ones pass on Windows, and then let the CI system tell us if the other ones still pass in the canonical environment.
I also came across the ' Before' - make sure your files are checked out with LF.
Probably need to go through the code base and make sure that all the code is OS agnostic, possibly this amounts just to making sure that the system treats any of \n , \r , \r\n as a line ending.
Also, I'm seeing complexity/coupling issues in the tests because of uncertainty on the runtime environment eg is HOME defined or not, or is the path variable PATH or Path? Again this makes windows a problem as most of the code is written with Linux in mind. Alot of the tests would be easier to understand if they were invoked in a subprocess as this would give us complete control over the environment variables the test cases see.
Also runnign checkstyle etc would clean up some stuff.
With https://github.com/typesafehub/config/pull/419 we have added PR validation on Windows. Therefore you should now have no problems when running tests on Windows. This is able to be merged after a test is added.
We do not intend to extend the functionality of "Typesafe Config" further. See https://github.com/lightbend/config#maintained-by